Creating a hook when building the sidebar

parent 4d9a2148
<?php
namespace Modules\Core\Events;
use Maatwebsite\Sidebar\Menu;
/**
* Hook BuildingSidebar
* Triggered when building the backend sidebar
* Use this hook to add your sidebar items
* @package Modules\Core\Events
*/
class BuildingSidebar
{
/**
* @var Menu
*/
private $menu;
public function __construct(Menu $menu)
{
$this->menu = $menu;
}
/**
* Add a menu group to the menu
* @param Menu $menu
*/
public function add(Menu $menu)
{
$this->menu->add($menu);
}
/**
* Get the current Laravel-Sidebar menu
* @return Menu
*/
public function getMenu()
{
return $this->menu;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment