Assume A,B,C,D are models. Is there a way to cleanly chain models like so: a->b()->c()->d()->get();? When trying to do this I get an error since a->b(), b->c(), and c->d() all return sets and a single object.
Some people have suggested eager loading in other sites but I have no idea how to use them. So far I have gone like a->load('b.c.d'); and in hopes of loading all the models to a but it didnt work.
How can I load all relevant models b,c,and d to a?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire