Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da0db012a0 |
@@ -8,14 +8,17 @@ use Illuminate\Support\Facades\Route;
|
||||
// Named dashboard route so route('dashboard') resolves; Vue Router handles rendering
|
||||
Route::get('/dashboard', fn () => view('app'))->middleware(['auth', 'verified'])->name('dashboard');
|
||||
|
||||
// Server-side logout — handles hard navigation to /logout
|
||||
// Server-side logout for the SPA's hard navigation (GET /logout).
|
||||
// Intentionally unnamed: the `logout` route name belongs to Fortify's POST /logout,
|
||||
// which the Blade auth forms target via route('logout'). Both can share the /logout
|
||||
// URL (different verbs), but two routes cannot share a name — that breaks route:cache.
|
||||
Route::get('/logout', function (Request $request) {
|
||||
Auth::logout();
|
||||
$request->session()->invalidate();
|
||||
$request->session()->regenerateToken();
|
||||
|
||||
return redirect('/');
|
||||
})->middleware('auth')->name('logout');
|
||||
})->middleware('auth');
|
||||
|
||||
Route::middleware(['auth'])->prefix('billing')->name('billing.')->group(function () {
|
||||
Route::get('/checkout/{tier}/{cadence}', [BillingController::class, 'checkout'])->name('checkout');
|
||||
|
||||
Reference in New Issue
Block a user