mardi 29 septembre 2015

How to use lists function while using where not in array filter?

Is it possible to generate a list(for a select item) while using hte whereNotIn filter option. I tried:

$sizes =  Size::lists('name', 'id')->whereNotIn('id', [1,3])->get();;

But i get the following error:

Call to undefined method Illuminate\Support\Collection::whereNotIn()

How should i filter these lists options?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1iZ5zwR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire