I'm trying to check the checkboxes on my edit view fetching the data from a table so the problem is all the checkboxes come unchecked. heres the code:
i don't know if this helps but in the table the data stores in an array there's not pivot table so i'm really trying to do it without using or making a pivot tablet.
<div class="form-group" style="padding-left: 1.4%">
{!!Form::label('estudio[]', 'Estudios Realizados* : ')!!}<br>
@foreach ($estudio as $key => $value)
@if(in_array($key, $my_estudio))
<input class="lista-estudio" name="estudio[]" type="checkbox" value="{{$key}}" id="estudio[]" checked> {{$value}}
@else
<input class="lista-estudio" name="estudio[]" type="checkbox" value="{{$key}}" id="estudio[]">{{$value}}
@endif
@endforeach
</div>