Docs Discussion Login Register
Get Started Installation Use As Package Administrator Configuration Category Property Attribute Product Developer Create Route Middleware Admin Configuration Admin Menu User Permission Breadcrumb Widget Create Views

Module Admin Menu

AdminMenu facade is very helpful for adding an admin menu for your custom module. Let say you want add a simple admin menu for your subscribe user list menu into an Admin of AvoRed E commerce. You can do that simply adding into your module.php files boot method by registering an Menu.

use AvoRed\Framework\AdminMenu\Facade as AdminMenuFacade;
use AvoRed\Framework\AdminMenu\AdminMenu;

// Below Line of code add a top level Menu into an Admin
AdminMenuFacade::add('promotion')
        ->label('Promotion')
        ->route('#')
        ->icon('fa fa-book');

// Below Line of get the added top level Menu
$promotionMenu = AdminMenuFacade::get('promotion');

// Below Line of code add a SubMenu of a Promotion Menu        
$promotionMenu->subMenu('subscribe',   function(AdminMenu $menu) {
        $menu->key('subscribe')
        ->label('Subscribe List')
        ->route('admin.subscribe.index')
        ->icon('fab fa-book');
    });

© AvoRed 2019 Privacy