Orjan
1 week ago

Generating menu

Posted 1 week ago by Orjan

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?

Please sign in or create an account to participate in this conversation.