I use many-to-many relationships in Laravel.
In result I get collection with nested relations like this:
User->categories->announcements
How to get easy last nested collection announcements
?
Just use nested foreach
loops. For example, if user is just one here (and not a collection of users):
@foreach ($user->categories as $category)
@foreach ($category->announcements as $announcement)
{{ $announcement->title }}
@endforeach
@endforeach