I have an array that I am setting up as checkboxes
<?php $buslist = array('Brooklyn','Lakewood'); ?>
@foreach ($buslist as $buses)
{{Form::label('brooklyn_1',$buses)}}
{{Form::checkbox('BusList2[]', $buses,false, ['id'=> $buses]) }}
@endforeach
Then I switch it to an string with a , using implode But when I try to edit my information, none of the checkboxes are selected and the information gets lost on update.
What code can i put into the blade checkboxes, if that bus is in my string list?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire