I am trying to get Eager-Loading nested relationships, with constraints, to work. Everyone seems to be giving the same example of eager-loading nested relationships:
<
If the relations in the models are correct you can simply do:
$user = User::with('posts.comments')->get();
You can add as many relations as you want ( or up to the memory limit ;)).
It also works with pivot tables.