I use laravel 5.4 framework and I want to delete remember me cookie in laravel. I've tried various ways like Session::flush()
$request->session()->flush();
$request->session()->regenerate(true);
$this->driver->manage()->deleteAllCookies();
and 'expire_on_close' => true,
in config/session.php
$remembercokkie = Auth::guard('administrator');
$cokkie = Cookie::forget($remembercokkie);
return redirect('/')->withCookie($cookie);
but nothing happen still the user log in. How do I fix this ?
To destroy a cookie, set it with a negative value for
$minutes
(the third argument).Source: http://coursesweb.net/laravel/cookies