Laravel 4: Using query builder lists for Form::select

Recently I realised I’ve been doing the wrong way to populate the array¬†for Form::select(). In order to get Form::select() to work, the array you parse in must contain key => value. So in the past, I’ve been doing it this way: $select_array = array(); foreach (Classname::all() as $model) { $select_array[$model->id] = $model->name; } It does … Continue reading Laravel 4: Using query builder lists for Form::select