Convert currencies

This commit is contained in:
Hillel Coren 2017-12-21 10:31:32 +02:00
parent c8579660df
commit 3773999ed0
2 changed files with 4 additions and 1 deletions

View File

@ -170,7 +170,7 @@ class SendReminders extends Command
{ {
$this->info('Loading latest exchange rates...'); $this->info('Loading latest exchange rates...');
$data = CurlUtils::get('https://api.fixer.io/latest'); $data = CurlUtils::get(config('ninja.exchange_rates_url'));
$data = json_decode($data); $data = json_decode($data);
Currency::whereCode('EUR')->update(['exchange_rate' => 1]); Currency::whereCode('EUR')->update(['exchange_rate' => 1]);

View File

@ -19,4 +19,7 @@ return [
'coupon_75_off' => env('COUPON_75_OFF', false), 'coupon_75_off' => env('COUPON_75_OFF', false),
'coupon_free_year' => env('COUPON_FREE_YEAR', false), 'coupon_free_year' => env('COUPON_FREE_YEAR', false),
// data services
'exchange_rates_url' => env('EXCHANGE_RATES_URL', 'https://api.fixer.io/latest'),
]; ];