1. Go to this page and download the library: Download faridbabayev/cbar-currency 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/ */
use FaridBabayev\CBARCurrency\Facades\CBAR;
$currencies = CBAR::currencies(); // this will fetch currencies for current date
$currencies = CBAR::from("18.02.2022")->currencies(); // this will fetch currencies for 18.02.2022
use FaridBabayev\CBARCurrency\Facades\CBAR;
$currencies = CBAR::currencies(); // this will fetch currencies for current date
$currencies = CBAR::from("18.02.2022")->currencies(); // this will fetch currencies for 18.02.2022
artisan migrate
use FaridBabayev\CBARCurrency\Facades\CBAR;
$currencies = CBAR::driver('database')->currencies(); // this will fetch currencies for current date
$currencies = CBAR::driver('database')->from("18.02.2022")->currencies(); // this will fetch currencies for 18.02.2022
use FaridBabayev\CBARCurrency\Facades\CBAR;
$currencies = CBAR::driver('file')->currencies(); // this will fetch currencies for current date
$currencies = CBAR::driver('file')->from("18.02.2022")->currencies(); // this will fetch currencies for 18.02.2022
$currencies = CBAR::currencies();
$currencies->toAZN('USD')->convert(); // returns AZN equivalent of 1.00 USD with today's currencies
$currencies->toAZN('USD')->convert(25.53); // returns AZN equivalent of 25.53 USD with today's currencies
$currencies = CBAR::currencies();
$currencies->fromAZN('USD')->convert(); // returns USD equivalent of 1.00 AZN with today's currencies
$currencies->fromAZN('USD')->convert(25.53); // returns USD equivalent of 25.53 AZN with today's currencies