mardi 2 avril 2019

How to get specific field from model?

How to change following model request to get only specific fields?

Event::whereIn("idEvent", $this->ids)->get();

I tried:

Event::select(["name", "id"])->whereIn("idEvent", $this->ids)->get();



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2CTK64x
via IFTTT

Aucun commentaire:

Enregistrer un commentaire