PHP code example of bigoen / currency-api-bundle

1. Go to this page and download the library: Download bigoen/currency-api-bundle 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/ */

    

bigoen / currency-api-bundle example snippets


return [
    // ...
    Bigoen\CurrencyApiBundle\BigoenCurrencyApiBundle::class => ['all' => true],
];

    $currencyBeaconService->updateCurrencies();
    

    $currencyBeaconService->updateDailyExchangeRates();
    

    $repository = $entityManager->getRepository(DailyExchangeRate::class);
    $exchangeRate = $repository->findOneBy(['date' => $date, 'currency' => $currency]);
    $amount = $repository->convert('TRY', 'EUR', Carbon::now(), 500);
    
bash
    php bin/console exchange-rate:currency-beacon:daily-update