Select box with first option empty

后端 未结 15 1267
情深已故
情深已故 2021-02-01 16:29

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

15条回答
  •  渐次进展
    2021-02-01 16:48

    In the view

    {!! Form::select('qualification_level', $qualification , old('Qualification_Level'), ['class' => 'form-control select2', 'placeholder' => '']) !!}

    In the Controller $qualification = \App\Qualification::pluck('name','id')->prepend('Please Select');

提交回复
热议问题