Problems with (Session flash) in laravel 5.3 Hi all, I have problems with "session flash" in laravel 5.3 does not work after you redirect, but if it works when it returns in a view.
I make a redirect from Paypal
Route::get('paypal/cancel/{id}', function($id){
session()->flash('pp_cancel', 'Transation Canceled');
return redirect("item/".$id);
});
But the view does not capture the session, which will be the problem.
Thank you very much that you can help
I'm facing the same problem. I double checked my middlewares and my controllers to have sure there weren't any "lost" redirects and also removed middleware "web" from web.php file, once it was being loaded twice per route.
So, @Azodian did you find a solution?
I placed
session()->put('pp_cancel', 'Transation Canceled');
in views
@php session()->forget('pp_cancel') @endphp
At the end of the file
Are you using Debugbar? You can easily see what's stored in the session.
Please sign in or create an account to participate in this conversation.