Laravel Cookie

With Response

With view

20200305 Update
Laravel Cookie always return NULL after redirection for unknown reason. Native php cookie should be a better solution

Important Comemnt:

Cookies are only returned to the browser at the end of the request, so you can never set and read the cookie in the same request cycle.

I suggest if you find the cookie set then you read it and add it to the session. If not then you set the cookie, and also add it to the session. Then, wherever you would have used the cookie, you use the session instead.