Easily retreive latest exchange rates value in your app.
By default, this package use the free endpoint provided by exchangerate-api.com but you can use it with any forex provider.
You can install the package via composer:
composer require finller/laravel-forex
You can publish the config file with:
php artisan vendor:publish --tag="laravel-forex-config"
This is the contents of the published config file:
use Finller\Forex\Integrations\ExchangeRateApi\ExchangeRateApiConnector;
return [
'cache' => [
'enabled' => true,
'driver' => env('FOREX_CACHE_DRIVER', env('CACHE_DRIVER', 'file')),
'expiry_seconds' => 86_400,
],
'rate_limit' => [
'enabled' => false,
'driver' => env('FOREX_RATE_LIMIT_DRIVER', env('CACHE_DRIVER', 'file')),
'every_seconds' => 3_600,
],
'client' => ExchangeRateApiConnector::class,
];
$rates = \Finller\Forex\Facades\Forex::get('USD');
$USD_to_EUR_rate = $rates['EUR'];
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.