From 95053c2e00dcd6446f4f1bee059c17b06e67ae92 Mon Sep 17 00:00:00 2001 From: sungro815 Date: Wed, 7 Jan 2026 16:35:11 +0900 Subject: [PATCH] =?UTF-8?q?admin=20guard=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/auth.php | 10 ++++++++++ routes/admin.php | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/config/auth.php b/config/auth.php index 7d1eb0d..e3ee958 100644 --- a/config/auth.php +++ b/config/auth.php @@ -40,6 +40,11 @@ return [ 'driver' => 'session', 'provider' => 'users', ], + + 'admin' => [ + 'driver' => 'session', + 'provider' => 'admins', + ], ], /* @@ -65,6 +70,11 @@ return [ 'model' => env('AUTH_MODEL', App\Models\User::class), ], + 'admins' => [ + 'driver' => 'eloquent', + 'model' => App\Models\AdminUser::class, + ], + // 'users' => [ // 'driver' => 'database', // 'table' => 'users', diff --git a/routes/admin.php b/routes/admin.php index c4d963b..0a2039d 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -1,6 +1,9 @@ name('admin.home'); +Route::middleware(['auth:admin'])->group(function () { + Route::get('/', function () { + return 'admin ok'; + })->name('admin.home'); +});