Adding A New Menu

The Menu on the dashboard admin is dynamically generated. This menu items are defined from the backend laravel controller located on this file:

If you take a look on the

method, you will see an array of MenuItem object being added. The menu item object will look like this:

This menu added are automatically filtered under the hood. That means if the user don’t belong to a group name you specified on “group_requirements” array then the menu will be filtered out and will not be visible by the user. The same goes with “permission_requirements”, if the user don’t have the permission you define on the “permission_requirements” array, the menu item will be filtered out.

Ofcourse, this is just UI. You will need to implement security manually to actually deny the user accessing those backend routes.

After adding a menuItem on the ::addMenu() array, you will now see a new menu item when you refresh the dashboard page, but this menu is not doing anything yet when you click it, you should create the corresponding vueJS routes and vue components or files.