Closed matbeard closed 7 years ago
Yes I had the same . I had to use
Currency::format($amount,Session::get('currency')
to get the format working.
How do you solve the fatal throwable error?
did you run the migration?
Sure
I face the same problem, but why isnt it working with helper function currency which is doing same thing? Isn't it?
I realised the issue with the exception is because \Illuminate\Session\Middleware\StartSession::class,
has not started. In 5.2, this is under $middlewareGroups in Http\Kernel.
Moving \Torann\Currency\Middleware\CurrencyMiddleware::class,
to $middlewareGroups fixes this.
@lyonlim :+1:
@azrahn where should I add this ?? Currency::format($amount,Session::get('currency')
@lyonlim it didn't worked
Someone please help me in solving this
When I add the Middleware to Kernel.php I get the following error on all pages:
Also, the default currency (which I have set to GBP) is not formatted. If I use
Currency::format(15)
the result is simply15
. If I specify the currency:Currency::format(15,'GBP')
it is properly formatted as£15.00
. Conversion is working.