lundi 2 mai 2016

Why is pluck('id') returning all id-s instead of just one?

The following query returns every Quote's id-s, instead of returning just one:

Quote::find(1)->pluck('id'); // --> [1, 2, 3, 4, ...]

Why is this happening?

Update

Strangely, the query:

Quote::where('id', 1)->pluck('id'); // --> [1]

works as expected.



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

Aucun commentaire:

Enregistrer un commentaire