Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是 laravel Blade selectyears,它从 2013 年到 2015 年生成选择,需要将第一个选项设置为 null。
{!! Form::selectYear('year', 2013, 2015) !!}
只需array(''=>"Select Year")在您的选择中添加另一个数组
array(''=>"Select Year")
我猜你需要 null 因为你可能需要放置一些这样Select Year的文本。
Select Year
这是你需要的
{!! Form::select('year', range(2013, 2015) + array(''=>"Select Year")) !!}