PHP code example of hexaequo / currency-converter-bundle

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

    

hexaequo / currency-converter-bundle example snippets



use Hexaequo\CurrencyConverterBundle\Converter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class MyController extends AbstractController
{
  public function myPage(Converter $converter) {
    $euroValue = $converter->convert(1.5,'BTC','EUR');
    // At the time I'm writting it this will be equal to: 23650,85
  }
  
}