PHP code example of brunoinds / paraguay-dolar-laravel
1. Go to this page and download the library: Download brunoinds/paraguay-dolar-laravel 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/ */
brunoinds / paraguay-dolar-laravel example snippets
use Brunoinds\ParaguayDolarLaravel\Exchange;
use Brunoinds\ParaguayDolarLaravel\Enums\Currency;
// Get current exchange rate
$result = Exchange::now()->convert(Currency::USD, 1)->to(Currency::PYG);
// Get historical exchange rate
$date = new DateTime('2023-12-10');
$result = Exchange::on($date)
->convert(Currency::USD, 1)
->to(Currency::PYG);
echo $result // 0.27
use Brunoinds\ParaguayDolarLaravel\Enums\Currency;
Currency::USD;
Currency::PYG;