I have written this code, that sets a cookie in client's browser, and after that must redirect the client to 'home' route,
$response = new Response();
$response->withCookie(cookie()->forever('language', $language));
$response->header('Location' , url('/home')) ;
return $response ;
the client receives these headers but the client doesn't make request for the "home" route
how should I do both, setting the cookie and redirect the user?