При логине создаю куки, но при логауте они не удаляются, хотя в постмане все работает. Вот код:
public function login(Request $request){
if(!Auth::attempt($request->only('email','password'))){
return response([
'message' => 'invalid credentials',
], Response::HTTP_UNAUTHORIZED);
}
$user = Auth::user();
$token = $user->createToken('token')->plainTextToken;
$cookie = cookie('jwt', $token, 60*24, '/', '', false, true, 1, 'none');
return response([
'messages' => 'Success',
'token' => $token,
])->withCookie($cookie);
}
и выход
public function logout(Request $request)
{
$cookie = Cookie::forget('jwt');
return response([
'message' => 'Success'
])->withCookie($cookie);
}
вот постман

и браузер

куки создали, юзера вернули

хоть и написало, что сработало, но куки остались