Created
December 17, 2020 16:19
-
-
Save sampoyigi/d80afd1b031634772ea9af6712093b25 to your computer and use it in GitHub Desktop.
Sample of adding/removing admin navigation items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from \Admin\ServiceProvider::replaceNavMenuItem | |
AdminMenu::registerCallback(function (Navigation $manager) { | |
// Change nav menu if single location mode is activated | |
if (AdminLocation::check()) { | |
$manager->mergeNavItem('locations', [ | |
'href' => admin_url('locations/settings'), | |
'title' => lang('admin::lang.side_menu.setting'), | |
], 'restaurant'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment