PHP code example of offline-agency / laravel-bank-of-italy
1. Go to this page and download the library: Download offline-agency/laravel-bank-of-italy 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/ */
offline-agency / laravel-bank-of-italy example snippets
$exchange_rate = new ExchangeRate();
$exchange_rates = $exchange_rate->getExchangeRates();
foreach ($exchange_rates->getItems() as $exchange_rate) {
dd($exchange_rate);
/*
OfflineAgency\LaravelBankOfItaly\Entities\ExchangeRate\ExchangeRate {
+currency: "Dollaro USA"
+currencyIsoCode: "USD"
+currencyUicCode: "001"
+rate: "1.0724"
+rateConvention: "Quantità di valuta estera per 1 Euro"
+referenceDate: "Y-m-d"
}
*/
}