O
O
OlegSedoy2021-09-23 11:21:05
Laravel
OlegSedoy, 2021-09-23 11:21:05

How to create and receive a Cookie in one request?

Trying to store the filter state in a cookie via GET parameters

return response()->view('public.timetable.index', $data)->cookie(cookie(''direction', $request->get('direction') ?? null, 60 * 24 * 90'));

But the cookie is only available on the next request. How to get it in this request?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question