mardi 1 novembre 2016

laravel collective checkbox form

I'm trying to implement checkbox and laravel collective in my form but I get only single value in form, any ideas how to fix it

{!! Form::open(array('action'=>'UserController@updateInfo','method'=>'post')) !!}
 Workdays:
<br>
{!! Form::label('monday', 'Monday') !!}
{!! Form::checkbox('workday', 'monday') !!}
<br>
{!! Form::label('tuesday', 'Tuesday') !!}
{!! Form::checkbox('workday', 'tuesday') !!}
<br>
{!! Form::label('wednesday', 'Wednesday') !!}
{!! Form::checkbox('workday', 'wednesday') !!}
<br>
{!! Form::label('thursday', 'Thursday') !!}
{!! Form::checkbox('workday', 'thursday') !!}
<br>
{!! Form::label('friday', 'Friday') !!}
{!! Form::checkbox('workday', 'friday') !!}
<br>
{!! Form::label('saturday', 'Saturday') !!}
{!! Form::checkbox('workday', 'saturday') !!}
<br>
{!! Form::label('sunday', 'Sunday') !!}
{!! Form::checkbox('workday', 'sunday') !!}
<br>
{!! Form::submit('Save', $attributes = ['class'=>'button']) !!}
{!! Form::close() !!}

when I print my request i only get single output (eg. selected monday friday I get only friday when request is processed)

also labels not working - ideas on that too?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire