I am using a checkbox in a form, for some reasons I can't store the value of the checkbox status (checked or unchecked).
I am using form model binding.
My form is:
{!! Form::model($profile, ['method' => 'PATCH', 'action' => ['ProfilesController@update', $profile->id]]) !!}
<div class="form-group">
{!! Form::label('wifi', 'Wifi') !!}
{!! Form::checkbox('wifi','yes', $profile->wifi) !!}Wifi
</div>
{!! Form::close() !!}
My Schema:
$table->boolean('wifi')->nullable;
But I also tried it with an integer
I can't figure out what I am doing wrong
Aucun commentaire:
Enregistrer un commentaire