PHP code example of bishwajitcadhikary / laravel-currency-exchange
1. Go to this page and download the library: Download bishwajitcadhikary/laravel-currency-exchange 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/ */
bishwajitcadhikary / laravel-currency-exchange example snippets
use Worksome\Exchange\Facades\Exchange;
$exchangeRates = Exchange::rates('USD', ['GBP', 'EUR']);
$rates = $exchangeRates->getRates(); // ['GBP' => 1.0, 'EUR' => 1.0]
it('retrieves exchange rates', function () {
Exchange::fake(['GBP' => 1.25, 'USD' => 1.105]);
$this->get(route('my-app-route'))
->assertOk();
Exchange::assertRetrievedRates();
});
bash
php artisan exchange:install
bash
php artisan exchange:rates USD GBP EUR