Laravel Cookie

Creating Cookie

In Laravel, cookies are created using the withCookie() method of a response instance of Illuminate\Http\Response class. All the Cookies generated by the laravel framework are encrypted and signed using an authentication token so that they can’t be modified by the client.


Retrieving Cookie

Once a cookie is created, it can be retrieved from the request using the cookie method on the Illuminate\Http\Request instance.