Neon Tsunami

Handy Laravel select helpers for ranges, years and months

September 27, 2013

Came across some groovy form helpers in Laravel that aren't currently documented (though I have made a pull request) which are actually pretty handy.

Select list with a range

echo Form::selectRange('number', 10, 20);

Select list with a year range

echo Form::selectYear('year', 1900, 2000);

Select list with month names

echo Form::selectMonth('month');

A blog about Laravel & Rails, written by Dwight Watson.