Level 52
Hi,
There is a good answer there.
Hi Guys,
Does anyone know if it's possible to eager load a polymorphic relationship that's being paginated? I can't seem to get it to work, if I paginate by 25 records, it's running a query for each.
I think I read online somewhere (a while ago) that this wasn't possible, but I can't remember where I saw this, and to be honest I may be imagining it. This is what I'm currently doing:
$this->user->with('account')->first()->paginate(25)
Which works, only it's making 25 queries :(
Please or to participate in this conversation.