addAdminAssets('admin.(login|reset).*', ['admin.login.css', 'admin.login.js']); $this->addAdminAssets('admin.(users|roles).(create|edit)', ['admin.user.css', 'admin.user.js']); $this->registerSentinelGuard(); $this->registerBladeDirectives(); } /** * Register the service provider. * * @return void */ public function register() { $this->app->bind(Authentication::class, SentinelAuthentication::class); } /** * Register sentinel guard. * * @return void */ private function registerSentinelGuard() { Auth::extend('sentinel', function () { return new Sentinel; }); } /** * Register blade directives. * * @return void */ private function registerBladeDirectives() { Blade::directive('hasAccess', function ($permissions) { return "hasAccess($permissions)) : ?>"; }); Blade::directive('endHasAccess', function () { return ''; }); Blade::directive('hasAnyAccess', function ($permissions) { return "hasAnyAccess($permissions)) : ?>"; }); Blade::directive('endHasAnyAccess', function () { return ''; }); } }