Skip to content
--unset-all edited this page Jul 18, 2014 · 6 revisions

As explained on the Home page wiki, that for this package using the package menu pingpong/menus. To find the manufacture and the addition of a menu, you can read the documentation of the package.

If you've read the documentation of pingpong/menus, of course you find a part of taking the instance menu. To add additional menu, use that way.

In this package there are two instances the menu, which is admin-menu and admin-menu-right. The admin-menu is a left menu and the admin-menu-right is a right menu.

// app/menus.php

# Don't forget to call event admin::menus on the top.
Event::fire('admin::menus');

# Left Menu
$leftMenu = Menu::instance('admin-menu');
// add a menu with url to a link
$leftMenu->url('admin/users', 'The Title');
// add a menu with url to a link
$leftMenu->route('your.route', 'The Title');

# Right Menu
$rightMenu = Menu::instance('admin-menu-right');
// add a menu with url to a link
$rightMenu->url('admin/users', 'The Title');
// add a menu with url to a link
$rightMenu->route('your.route', 'The Title');
// add dropdown
$rightMenu->dropdown('Pages', function ($sub)
{
	$sub->route('admin.pages.index', 'All Pages');
	$sub->route('admin.pages.create', 'Add New');		
});

Please see the documentation of pingpong/menus for more information.

Clone this wiki locally