add logout feature

This commit is contained in:
kusowl 2026-02-24 18:15:47 +05:30
parent 94da4e9f6a
commit 6419adb7d1
2 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,7 @@
| |
*/ */
'paths' => ['api/*', 'sanctum/csrf-cookie', 'login'], 'paths' => ['api/*', 'sanctum/csrf-cookie', 'login', 'logout'],
'allowed_methods' => ['*'], 'allowed_methods' => ['*'],

View File

@ -9,3 +9,5 @@
// We are using sanctum for SPA, which requires web guard // We are using sanctum for SPA, which requires web guard
Route::post('/login', [AuthenticatedUserController::class, 'store']); Route::post('/login', [AuthenticatedUserController::class, 'store']);
Route::post('/logout', [AuthenticatedUserController::class, 'destroy']);