Commit 54998c24 authored by Nicolas Widart's avatar Nicolas Widart

Add the event fire method in the SP

parent 7de42dfd
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
use Illuminate\Routing\Router; use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Modules\User\Events\RegisterSidebarMenuItemEvent;
class UsersServiceProvider extends ServiceProvider class UsersServiceProvider extends ServiceProvider
{ {
...@@ -33,6 +34,7 @@ class UsersServiceProvider extends ServiceProvider ...@@ -33,6 +34,7 @@ class UsersServiceProvider extends ServiceProvider
$this->app->booted(function ($app) { $this->app->booted(function ($app) {
$this->registerFilters($app['router']); $this->registerFilters($app['router']);
$this->registerBindings(); $this->registerBindings();
$this->registerEvents($app['events']);
}); });
} }
...@@ -74,4 +76,9 @@ class UsersServiceProvider extends ServiceProvider ...@@ -74,4 +76,9 @@ class UsersServiceProvider extends ServiceProvider
'Modules\User\Repositories\Sentinel\SentinelRoleRepository' 'Modules\User\Repositories\Sentinel\SentinelRoleRepository'
); );
} }
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