I am trying to populate my select box from DB with this approach
{!! Form::select('worktypes', $worktypes->lists('name'), null, ['class' => 'col-md-2 form-control', 'required', 'placeholder' => '--auswählen']) !!}
But method lists() doesn't exist anymore in Laravel 5.3
Is there some other method for this?
I just found out:
Method lists()
is deprecated in Laravel v5.2^
It is renamed to:
pluck()
The method signature remains the same.
Laravel Documentation
search for Deprecations
on that link
Update: just in case that link ever dies or page changes, this is what was on it:
Deprecations The following features are deprecated in 5.2 and will be removed in the 5.3 release in June 2016:
The lists method on the Collection, query builder and Eloquent query builder objects has been renamed to pluck. The method signature remains the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With