LaravelCollective / html

HTML and Form Builders for the Laravel Framework
MIT License
3.98k stars 768 forks source link

Form::radio not checked when using Laravel 5.7 #585

Open marwan2 opened 5 years ago

marwan2 commented 5 years ago

After upgrade to Laravel 5.7 & LaraCollective 5.7 The Form::radio not check the one who reflect the value come from DB: The following code now not working properly

{!! Form::model($genre, [ 'method' => 'PATCH', 'url' => ['admin/ezine_genres', $genre->id], 'class' => 'form-horizontal author_form', 'files' => true ]) !!}

{!! Form::label('type', 'Type', ['class'=>'col-md-3 control-label required']) !!}
pacoorozco commented 4 years ago

This code is not working:

{!! Form::radio('public_key', 'maintain', true, array('class' => 'form-check-input', 'id' => 'maintain_public_key')) !!}

But, this code is working properly.... Does it makes sense?

{!! Form::radio('public_key', 1, true, array('class' => 'form-check-input', 'id' => 'maintain_public_key')) !!}