json(['status' => 'ok', 'timestamp' => now()->toISOString()]); }); Route::view('/', 'welcome'); Route::view('dashboard', 'dashboard') ->middleware(['auth', 'verified']) ->name('dashboard'); Route::view('profile', 'profile') ->middleware(['auth']) ->name('profile'); // Workspace-scoped routes — placed before slug catch-all Route::middleware(['auth', 'verified', ResolveWorkspace::class]) ->prefix('w/{workspace}') ->name('w.') ->group(function () { Route::get('/links', Index::class)->name('links.index'); Route::get('/qr', App\Livewire\Pages\QrCodes\Index::class)->name('qr.index'); Route::get('/bio', App\Livewire\Pages\Bio\Index::class)->name('bio.index'); Route::get('/analytics', App\Livewire\Pages\Analytics\Index::class)->name('analytics.index'); Route::get('/domains', App\Livewire\Pages\Domains\Index::class)->name('domains.index'); Route::get('/settings', App\Livewire\Pages\Settings\Index::class)->name('settings.index'); Route::get('/billing', App\Livewire\Pages\Billing\Index::class)->name('billing.index'); }); // 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 Route::get('/{slug}', RedirectController::class) ->where('slug', '[a-zA-Z0-9_-]+') ->name('redirect'); require __DIR__.'/auth.php';