use imanilchaudhari\CurrencyConverter\CurrencyConverter;
use imanilchaudhari\CurrencyConverter\Provider\ExchangeRatesApi;
$converter = new CurrencyConverter([
'provider' => [
'class' => ExchangeRatesApi::class,
],
]);
$rate = $converter->convert('USD', 'NPR');
print_r($rate); // it will print the current Nepalese currency (NPR) rate according to USD
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.