Ad

Laravel Error Stored In Session

- 1 answer

I'm learning laravel (currently using 5.0.34 version) and I have a post request that when encounters an error enters this piece of code

$message = new MessageBag(["register" => Lang::get("errors.cant_checkout")]);
return Redirect::back()->withErrors($message);

And the result is correct, he redirects to the same view and I can access the $error variable. The problem is sometimes the error keeps stored on session, so it will output the $error everytime I enter the page. How can this happen? Am I doing something wrong?

Expected : after output first time, the $error gets off the Session

Ad

Answer

After searching I found out that what's causing the problem is an installed plugin called DebugBar. After disabling it everything is running smooth!

Ad
source: stackoverflow.com
Ad