Cookies: Generating Cookie Instances

$cookie = cookie('name', 'value', $minutes);

return response('Hello World')->cookie($cookie);

If you would like to generate a Symfony\Component\HttpFoundation\Cookie instance that can be given to a response instance at a later time, you may use the global cookie helper.

Related concepts

Generating Cookie Instances

Cookies: Generating Cookie Instances — Structure map

Clickable & Draggable!

Cookies: Generating Cookie Instances — Related pages: