Commit d0d991a0 authored by Nicolas Widart's avatar Nicolas Widart

Removing sidebar event classes

parent 7408dc71
<?php namespace Modules\User\Events;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Request;
class RegisterSidebarMenuItemEvent
{
public $items;
public function __construct()
{
$this->items = new Collection;
$prefix = Config::get('core::core.admin-prefix');
$this->items->put('user', Collection::make([
[
'weight' => '1',
'request' => Request::is("{$prefix}/users*") or Request::is("{$prefix}/roles*"),
'route' => '#',
'icon-class' => 'fa fa-user',
'title' => 'Users & Roles',
],
[
'request' => "{$prefix}/users*",
'route' => 'dashboard.user.index',
'icon-class' => 'fa fa-user',
'title' => 'Users',
],
[
'request' => "{$prefix}/roles*",
'route' => 'dashboard.role.index',
'icon-class' => 'fa fa-flag-o',
'title' => 'Roles',
]
]));
}
}
\ No newline at end of file
...@@ -79,6 +79,5 @@ class UserServiceProvider extends ServiceProvider ...@@ -79,6 +79,5 @@ class UserServiceProvider extends ServiceProvider
private function registerEvents($events) private function registerEvents($events)
{ {
$events->fire('sidebar.menu.item_event', new RegisterSidebarMenuItemEvent);
} }
} }
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