I'm having problem on setting the default value of "Please Select" on my select form from laravel. here comes the code.
$user = \App\User::where('role_id','=','3')->orderBy('name', 'ASC')->lists('name','staff_id');
and here's on my blade
{!! Form::select('requestby', $user, Input::old('requestby'), array('class' => 'form-control')) !!}
i have tried to put the array_merge but it seems like it is overwriting the <option> value from staff_id to index value. what should i do now?
array_mergewill re-index the array when merging. You can use+for this -The
indexs will not be changed.