Route::middleware('auth:sanctum')->group(function (){ Route::post('logout', [Controllers\AuthController::class, 'logout']); Route::get('profile', [Controllers\AuthController::class, 'profile']); }); Route::post('register', [Controllers\AuthController::class, 'register']); Route::post('login', [Controllers\AuthController::class, 'login']);
Практика