Torann / laravel-currency

This provides Laravel with currency functions such as currency formatting and conversion using up-to-date exchange rates.
http://lyften.com/projects/laravel-currency
BSD 2-Clause "Simplified" License
392 stars 137 forks source link

The use of Reflash() in middle-ware has some unwanted consequences #44

Closed azrahn closed 7 years ago

azrahn commented 8 years ago

Hi, In the MiddleWare you use reflash method. This causes other flash messages also to reflash and they keep being reflashed for ever. I suggest changing $request->getSession()->reflash(); to $request->getSession()->keep('currency);

lyonlim commented 8 years ago

This!

I almost decided to re-import my app onto a fresh Laravel installation because of this issue. Probably wasted almost a day on this. There's also the issue with the Middleware exception.

At this point, since I don't need the option to switch currency, I've disabled the Middleware and fixed both issues as such.

Torann commented 7 years ago

You have to ensure the middleware is after \Illuminate\Session\Middleware\StartSession::class in the app/Http/Kernel.php file.

azrahn commented 7 years ago

I have checked and the middleware is after \Illuminate\Session\Middleware\StartSession::class in the app/Http/Kernel.php file. Problem is still there.

Torann commented 7 years ago

Ok, I just moved to keep in v0.3.4. Works perfectly thank you 👍