diff options
author | Frankie B <git@diskfloppy.me> | 2024-06-18 02:52:19 +0100 |
---|---|---|
committer | Frankie B <git@diskfloppy.me> | 2024-06-18 02:52:19 +0100 |
commit | e1717e13d181b3f7a4cf34cb4b054ca11953d2cb (patch) | |
tree | 3438d770d01027e115868d474be1225165ecd09e /routes | |
parent | 0f4da7e3dfd0d063d9aede10c12d7769e56cc88d (diff) |
Move admin routes to prefix group
Diffstat (limited to 'routes')
-rw-r--r-- | routes/web.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/routes/web.php b/routes/web.php index 6456439..fb12e96 100644 --- a/routes/web.php +++ b/routes/web.php @@ -37,13 +37,11 @@ Route::post('/guestbook', [GuestbookController::class, 'addEntry']) ->middleware('rate_limit'); // Admin pages -Route::get('/admin/guestbook', [AdminGuestbookController::class, 'show']) - ->middleware('auth'); -Route::get('/admin/bookmarks', [AdminBookmarksController::class, 'show']) - ->middleware('auth'); -Route::get('/admin/import', [AdminImportController::class, 'show']) - ->middleware('auth'); -Route::post('/admin/import', [AdminImportController::class, 'submit']) - ->name('admin.import.submit') - ->middleware('auth'); +Route::prefix('admin')->group(function () { + Route::get('/admin/guestbook', [AdminGuestbookController::class, 'show']); + Route::get('/admin/bookmarks', [AdminBookmarksController::class, 'show']); + Route::get('/admin/import', [AdminImportController::class, 'show']); + Route::post('/admin/import', [AdminImportController::class, 'submit']) + ->name('admin.import.submit'); +})->middleware('auth'); |