From fc5ab16f02fd5f48755b75ae8d1937d992c1e83d Mon Sep 17 00:00:00 2001 From: boban Date: Sat, 16 May 2026 08:57:12 +0200 Subject: [PATCH] fix(routes): move auth.php require before slug catch-all The /{slug} redirect route matched /login, /register etc. because auth.php was required after it. Auth routes must be registered first. Co-Authored-By: Claude Sonnet 4.6 --- routes/web.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/routes/web.php b/routes/web.php index 7f83e42..4eaf050 100644 --- a/routes/web.php +++ b/routes/web.php @@ -37,10 +37,9 @@ Route::middleware(['auth', 'verified', ResolveWorkspace::class]) // Bio page route — must be before the slug catch-all Route::get('/bio/{slug}', [BioPageController::class, 'show'])->name('bio.public'); -// Redirect service — handles slugs on main domain and custom domains -// Placed after all named routes so dashboard/profile etc. are not caught here +require __DIR__.'/auth.php'; + +// Redirect service — catch-all, must be last Route::get('/{slug}', RedirectController::class) ->where('slug', '[a-zA-Z0-9_-]+') ->name('redirect'); - -require __DIR__.'/auth.php';