szunisoft/laravel-mnb is a Laravel package for laravel mnb (magyar nemzeti bank).
It currently has 4 GitHub stars and 384 downloads on Packagist (latest version v2.0.1).
Install it with composer require szunisoft/laravel-mnb.
Discover more Laravel packages by szunisoft
or browse all Laravel packages to compare alternatives.
Last updated
Package requires Soap and version 7.1 of PHP or higher.
This package was built on top of this MNB package. Please check out for corresponding documentations.
composer require szunisoft/laravel-mnb
php artisan vendor:publish --provider="SzuniSoft\Mnb\Laravel\MnbServiceProvider" --tag="config"
/*
* Wsdl file location.
* */
'wsdl' => env('MNB_SOAP_WSDL', 'http://www.mnb.hu/arfolyamok.asmx?wsdl'),
'cache' => [
/*
* Desired cache driver for service.
* */
'store' => env('MNB_CACHE_DRIVER', 'file'),
/*
* Minutes the cached currencies will be held for.
* Default: 24hrs (1440)
* */
'minutes' => env('MNB_CACHE_MINUTES', 1440),
]
use SzuniSoft\Mnb\Laravel\Facade\Mnb
$currency = Mnb::currentExchangeRate('EUR');
$currency = app(\SzuniSoft\Mnb\Laravel\Client::class)->currentExchangeRate('EUR');
You can check the feed date by passing a $date variable to some methods. These methods will make variable to be a Carbon instance.
Mnb::exchangeRates($date);
$date->isToday();
These methods won't use and update cache.
These methods will use cache.