When I log out with auth:sanctum middleware , the user_id field on sessions tabel is not set to null, unlike when I don't use it.
Route::post('/logout', function (Request $request) {
Auth::guard('web')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return ['done' => 'ok'];
})->middleware('auth:sanctum');
The problem is that I have routers that use this middleware and sometimes I need to log out for some reason. When using auth:sanctum, the user_id is not set to null.
i don't use tokens , i use sessions and cookies with sanctum, and sessions driver is database
