Skip to content

apvalkov/laravel-openexchangerates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel openexchangerates

Installation

Require this package with composer using the following command:

composer require apvalkov/laravel-openexchangerates

Add the following class to the providers array in config/app.php:

Apvalkov\LaravelOpenexchangerates\ServiceProvider::class,

You can also publish the config file to change implementations (ie. interface to specific class).

php artisan vendor:publish --provider="Apvalkov\LaravelOpenexchangerates\ServiceProvider"

Set your openexchangerates app id

OPEN_EXCHANGE_RATES_APP_ID=your-app-id-here

How to use

// Latest
$rates = (new Openexchangerates())->latest(new LatestRatesRequest());

//Historical
$rates = (new Openexchangerates())->historical(new LatestRatesRequest(), Carbon::now());

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages