add error page

This commit is contained in:
Romulus21
2026-05-27 11:11:51 +02:00
parent ccd7934bb8
commit d0b7c9872b
2 changed files with 63 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>401 Accès non autorisé</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: ui-sans-serif, system-ui, sans-serif;
background: #f8fafc;
color: #1e293b;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.card {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 2.5rem 3rem;
max-width: 420px;
width: 100%;
text-align: center;
box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.code {
font-size: 4rem;
font-weight: 700;
color: #e11d48;
line-height: 1;
margin-bottom: .5rem;
}
h1 {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: .75rem;
}
p {
font-size: .95rem;
color: #64748b;
line-height: 1.6;
}
</style>
</head>
<body>
<div class="card">
<div class="code">401</div>
<h1>Accès non autorisé</h1>
<p>{{ $exception->getMessage() ?: 'Vous n\'êtes pas autorisé à accéder à cette ressource.' }}</p>
</div>
</body>
</html>
+4
View File
@@ -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()) {