我laravel我想创建一个想要有'select option,Approved,Rejected
'的选择框但是我总是在表单中显示已批准为默认选项
echo Form::select('request_status',[''=>'Select option','4'=>'Approved','7'=>'Rejected'],null,['class'=>'request_status report_filter default']);
如何在laravel 5.3
中将选项作为默认选项答案 0 :(得分:1)
Form::select
中的第三个参数是所选项目:
Form::select('request_status',[''=>'Select option','4'=>'Approved','7'=>'Rejected'],null,['class'=>'request_status report_filter default']);
Approved
应为4:
Form::select('request_status',[''=>'Select option','4'=>'Approved','7'=>'Rejected'],4,['class'=>'request_status report_filter default']);
或者如果你想要do it manualy