diff --git a/resources/views/errors/401.blade.php b/resources/views/errors/401.blade.php new file mode 100644 index 0000000..c1e9613 --- /dev/null +++ b/resources/views/errors/401.blade.php @@ -0,0 +1,59 @@ + + + + + + 401 – Accès non autorisé + + + +
+
401
+

Accès non autorisé

+

{{ $exception->getMessage() ?: 'Vous n\'êtes pas autorisé à accéder à cette ressource.' }}

+
+ + diff --git a/src/DelegateAuthServiceProvider.php b/src/DelegateAuthServiceProvider.php index cd47fef..2bf1591 100644 --- a/src/DelegateAuthServiceProvider.php +++ b/src/DelegateAuthServiceProvider.php @@ -19,6 +19,10 @@ class DelegateAuthServiceProvider extends ServiceProvider __DIR__.'/../config/delegate-auth.php' => config_path('delegate-auth.php'), ], 'delegate-auth-config'); + $this->publishes([ + __DIR__.'/../resources/views/errors/401.blade.php' => resource_path('views/errors/401.blade.php'), + ], 'delegate-auth-views'); + $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); if ($this->app->runningInConsole()) {