I'm trying to show a structure using as example the tables showed in this thread: Laravel Eloquent Filter By Column of Relationship
Using this I would like to show in one page (index.blade.php for example) something like this:
Category 1
Post1.Category1
Post2.Category1
Category 2
Post1.Category2
Post2.Category2
Post3.Category2
Post4.Category2
Category 3
Post1.Category3
I don't know what exactly which arrays to I need to pass from Controller.
I can get the list of Categories but how the post for each category???
Thanks
Any idea