问题
here is laravel blade selectyears which generates select from 2013 to 2015 and need set first option to null.
{!! Form::selectYear('year', 2013, 2015) !!}
回答1:
Just have another array array(''=>"Select Year") in your select
I guess that you need null because you might need to place some text like Select Year like that.
Here is What you need
{!! Form::select('year', range(2013, 2015) + array(''=>"Select Year")) !!}
来源:https://stackoverflow.com/questions/33709528/how-set-null-to-first-option-in-laravel-5-blade