I have an application where admin can change the currency from the backend panel. As now cashier 10 has no useCurrency()
method like older versions. What could be the way to set currency other than configuring the .env
file?
Asked
Active
Viewed 850 times
2

mare96
- 3,749
- 1
- 16
- 28

Munna Khan
- 1,902
- 1
- 18
- 24
1 Answers
0
You can overwrite config used by laravel cashier.
i.e
config(['cashier.currency'=> 'EUR']);
You can also verify after updating the config.
$currency = config('cashier.currency');
You can verify that config here in billable trait being used.
https://github.com/laravel/cashier/blob/10.0/src/Billable.php#L793

Muhammad Awais
- 395
- 1
- 4
- 15