A
A
Archakov Dennis2015-06-22 15:25:59
Laravel
Archakov Dennis, 2015-06-22 15:25:59

Why doesn't Laravel clear cookies?

At the moment, I started working with cookies and there was such a trouble. CookieJar , which uses the laravel standard, creates cookies, but does not delete them ;( I
did this:

Cookie::forget('myname');
Cookie::unqueue('myname');

But no use! It does not remove this setting. And I do not need to replace, I would like to delete.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mokhirjon Naimov, 2017-04-10
@zvermafia

$cookie = \Cookie::forget('myCookie');
return response('view')->withCookie($cookie);

Source: Deleting cookies in Laravel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question