PHP code example of finller / laravel-forex

1. Go to this page and download the library: Download finller/laravel-forex library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

finller / laravel-forex example snippets



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'];

bash
php artisan vendor:publish --tag="laravel-forex-config"