I wrote this code that sets a cookie in a client browser and then redirects the client to the "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 does not request a "home" route 
how can I do both by setting a cookie and redirecting the user?
Salar source share