Collect dollar rate from various sources like:
Simply enter composer require lostkoder/exchanger
in terminal.
<?php
$provider = new \Exchanger\ProviderChain([
new \Exchanger\Source\OXEProvider(),
new \Exchanger\Source\IranjibProvider(),
new \Exchanger\Source\TGJUProvider(),
]);
$rate = $provider->getRate();
Create a provider class which implements DollarToRialRateProvider
interface and plug it in ProviderChain
mentioned in quick start.