I need to give selected value like this html:
Setting selected option is very simple in laravel form :
{{ Form::select('number', [0, 1, 2], 2) }}
Output will be :
<select name="number">
<option value="0">0</option>
<option value="1">1</option>
<option value="2" selected="selected">2</option>
</select>
To echo some other answers here, the code I just used with 5.6 is this
{{ Form::select('status', ['Draft' => 'Draft', 'Sent' => 'Sent', 'Paid' => 'Paid'], $model->status, ['id' => 'status']) }}
In order to be able to use the Form Helper from LaravelCollective I took a look at https://laravelcollective.com/docs/master/html#drop-down-lists
I also had to composer require the dependency also so that I could use it in my projects
composer require "laravelcollective/html":"^5"
Lastly I altered my config/app.php
and added the following in the $aliases
array
'Form' => Collective\Html\FormFacade::class,
https://laravelcollective.com/docs/master/html should be consulted if any of the above ceases to work.