Retrieves Swiss Franc exchange rates for foreign currencies based on data from the website of the Swiss Federal Customs Administration.
The library uses internal caching of requested data (cache time is one week).
use MrCage\EzvExchangeRates\EzvExchangeRates;
$rate = EzvExchangeRates::getExchangeRate('EUR');
The date must be specified as Carbon date object.
$rate = EzvExchangeRates::getExchangeRate('USD', Carbon::yesterday());
$currencies = EzvExchangeRates::listCurrencies();
This will return a list of currency codes as an array, the key being the (uppercase) currency code, and the value being the base value used for the exchange rate.