Login    Register

Dynamic Menu System

Laravel Issue Discuss here
  • Author

Dynamic Menu System

Postby Laravel Expert » Thu Jun 29, 2017 5:47 pm

I was wanting to make a Dynamic Menu System which pretty much means whatever amount of packages I add to my project they can add a menu dynamically to my admin system without touching the database.

There was two ways I was thinking of doing this (not sure if they would work) just wanting to get some opinions.

Events System

Theoretically I could Listen on menu.create and when when the page loads call menu.create which just returns either HTML or a function name that gets called.

Not sure if this could get slow with so many events getting added.

Config System

Each modules has a config/menu.php (not sure if you can have multiple and how you can loop through them all) which has all the required menu items/links in it already for me.

If anyone has any other options I would love to here them.

Pretty much I would need to use the exact same approach for a Widget system as well.
Laravel Expert
Posts: 7
Joined: Thu Jun 29, 2017 5:16 pm

Return to Laravel

Who is online

Users browsing this forum: No registered users and 0 guests