dimanche 26 février 2017

How to get object from nested Eager Loading Laravel?

In query I use Nested Eager Loading:

$res = User::where("id", 1)->with("categories.categoryAnn.announcements")->get();

In result of this query I get nested collections:

Collection->User->categories->categoryAnn->announcements

How to shortly get last nested object announcements?



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

Aucun commentaire:

Enregistrer un commentaire