PHP code example of imagina / icurrency-module

1. Go to this page and download the library: Download imagina/icurrency-module 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/ */

    

imagina / icurrency-module example snippets

  
  protected $middleware = [
    // ...
      \Modules\Icurrency\Http\Middleware\CurrencyMiddleware::class,
    // ...
  ];

  protected $commands = [
    // ...
      Modules\Icurrency\Console\UpdateCurrencies::class
    // ...
  ];

  protected function schedule(Schedule $schedule)
  {
    // ...
    $schedule->command(Modules\Icurrency\Console\UpdateCurrencies::class)->dailyAt('01:00');
    // ...
  }
 
use Modules\Icurrency\Support\Facades\Currency;

    /* Example */
    Currency::convert(1000): 
  

    /* Example */
    Currency::convertFromTo(1000, 'COP', 'AUD');
  

    /* Example */
    Currency::getLocaleCurrency();
  

    /* Example */
    Currency::setLocaleCurrency('COP');
  

    /* Example */
    Currency::getSupportedCurrencies();
  
ssh
php artisan currencies:update