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 ''; }); } }