Monday, March 6, 2017

Is it possible to use eager loading with the querybuilder in Laravel?

Querybuilder object

As one can see above, there is a 'eagerLoad' section and the querybuilder accepts calling $query->with('relation') but produces the following error: Method addEagerConstraints does not exist.

I've tried to find some documentation on this matter but didn't find much. IS it possible at all to use eager loading in this case? If so, could anyone tell how?



via Bert H

Advertisement