laravel-menu icon indicating copy to clipboard operation
laravel-menu copied to clipboard

README suggests creating menus in middleware but this can lead to performance issues

Open kminek opened this issue 4 months ago • 0 comments

If your menu is created dynamically (for instance from database queries) those queries will be executed for every web request, even on pages where you dont have menus. This is because Menu::makeOnce resolves callback immediately! I was not aware of that and honestly this behaviour surprised me. I think callback should be resolved while trying to render menu.

kminek avatar Oct 08 '24 16:10 kminek