Laravel - Responses - Expiring Cookies Early
You may remove a cookie by expiring it via the withoutCookie
method of an outgoing response:
return response('Hello World')->withoutCookie('name');
If you do not yet have an instance of the outgoing response, you may use the Cookie
facade's expire
method to expire a cookie:
Cookie::expire('name');