I have a a group instance I want to eager load with pagination:
group
public function show(Group $group) { $group = $group->with(\'members);
You can do that but it's not recommended because using paginate for eager loaded relationships generates two repeated queries
public function show(Group $group) { $group = $group->with(['members' => function($query) { $query->paginate(24); }]); return $group; }