From 02c68f854589e63ba4ee1d5a8732ba9be25ceb6a Mon Sep 17 00:00:00 2001 From: Frankie B Date: Tue, 18 Jun 2024 02:52:19 +0100 Subject: [PATCH] Move admin routes to prefix group --- routes/web.php | 16 +++++++--------- 1 file 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 @@ ->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');