lundi 2 mai 2016

Extract only raw ids from an Eloquent collection

I need to get an array of integers, which will contain raw ids of Eloquent records. The following query

Quote::select('id')->get();

gets an eloquent collection instead of an array of integers. How to modify it, so it meets my requirements?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire