Orjan's avatar
Level 8

Generating menu

Hello there.

I'm new to laravel. Been following the basics here on laracasts and reading some more.

I got the spatie/laravel-menu package to build a menu system from code to just add in to the template. But where should I create the menu code?

A main menu for the whole site I don't want to do for each and every controller/method, as it is global. I just want it to be placed in an appropriate place.

Now I actually do it in the routes/web.php, which feels wrong. It should be in every request, so where should it be built?

0 likes
2 replies

Please or to participate in this conversation.