Does anybody know how can I set in my select box the first option to empty value?
I\'m getting the data from my DB, and I would like to set the option by default as \"P
You need to manipulate the array before the view
or to be messy you could do it in blade @php tags
$users= [null => 'Empty'];
$dbusers= User::pluck('id', 'name');
$users= array_merge($users, $dbusers->toArray());
return view('myview', compact('users'))
and then you can do the following in the view
{{ Form::select('user',$users, ['class' => 'form-control']) }}