Answer the question
In order to leave comments, you need to log in
Why are cookies not being read?
I don't understand why the cookies I set are not being read?
Added city cookie with value 4019 via JS
Now I'm trying to get this cookie
public function index(Request $request)
{
dd($request->cookie('city'));
dd($_COOKIE['city']);
se Illuminate\Http\Response;
public function index(Request $request)
{
$minutes = 60;
$response = new Response('Set Cookie');
$response->withCookie(cookie('name', 'MyValue', $minutes));
dd($request->cookie('name'));
Cookie::queue(Cookie::make('name222', 'value', 11));
Cookie::queue('name222', 'value', 11);
$cookie = cookie('name', 'value', 111);
dd($request->cookie());
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question