Laravel 3, sessions flash, flush and forget doesnt work between methods

221 Views Asked by At

In my job we have a system that is running on Laravel 3.0, and we have an issue when we use the Session::flash('whatever'), if we keep in the same function or method, for example, post_new(){}. The session variable is deleted at the end of the next execution as it should do, but if we use a redirect()->with() or Session::flash('something'); return redirect(), it does not work.

The session is stored but never deleted, even more, we cannot delete it from the other method that the same session created even if we use Session::flush() or Session::forget().

Do you have any experience with this issue? We didn't configure the project, it was already running when we started working here, we are just adding functions.

0

There are 0 best solutions below