I'm getting exceptions when I'm trying to resolve malformed session_cookies for laravel.. Is there a good way to reset the session cookie on error handling and redirect to the homepage to generate a new one?
My current code set:
App::error(function(InvalidArgumentException $exception)
{
if(condition) {
Log::error('Cookie: Invalid Exception Cookie. Clear Session Cookies and redirect');
return Redirect::to('/')
->withCookie(Cookie::forget(Config::get('session.cookie'));
}
}
Hello,
I am facing a similar issue recently and I need to wipe my session cookies and all the other cookies I might have set within my application. Could you find a proper way to do it within Laravel (5.1)?
Thanks, Federico
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community