PHPackages                             csaba215/laravel-mnb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. csaba215/laravel-mnb

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

csaba215/laravel-mnb
====================

Laravel MNB (Magyar Nemzeti Bank)

v1.0.0(1y ago)02MITPHPPHP ^8.2CI passing

Since Apr 28Pushed 1y agoCompare

[ Source](https://github.com/csaba215/laravel-mnb)[ Packagist](https://packagist.org/packages/csaba215/laravel-mnb)[ RSS](/packages/csaba215-laravel-mnb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

Laravel-MNB
===========

[](#laravel-mnb)

[![Tests](https://github.com/csaba215/laravel-mnb/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/csaba215/laravel-mnb/actions/workflows/tests.yml)[![Laravel framework tests](https://github.com/csaba215/laravel-mnb/actions/workflows/laravel-tests.yml/badge.svg?branch=master)](https://github.com/csaba215/laravel-mnb/actions/workflows/laravel-tests.yml)

Requirements
------------

[](#requirements)

Package requires Soap, SimpleXML and version 8.2 of PHP or higher.

Know-how
--------

[](#know-how)

Please check out for corresponding documentations.

Install
-------

[](#install)

```
composer require csaba215/laravel-mnb
```

Configuration
-------------

[](#configuration)

### Export

[](#export)

```
php artisan vendor:publish --provider="Csaba215\Mnb\Laravel\MnbServiceProvider" --tag="config"
```

### config/mnb-exchange.php

[](#configmnb-exchangephp)

```
    /*
     * Wsdl file location.
     * */
    'wsdl' => env('MNB_SOAP_WSDL', 'https://mnb.hu/arfolyamok.asmx?wsdl'),

    'cache' => [
        /*
         * Desired cache driver for service.
         * */
        'store' => env('MNB_CACHE_DRIVER', 'file'),

        /*
         * Minutes the cached currencies will be held.
         * Default: 24hrs (1440)
         * */
        'minutes' => env('MNB_CACHE_MINUTES', 1440),

        /*
         * Desired cache key prefix.
         * */
        'key' => env('MNB_CACHE_KEY', 'mnb'),
    ],
];
```

Usage
-----

[](#usage)

### Access via facade

[](#access-via-facade)

```
use Csaba215\Mnb\Laravel\Facade\Mnb

$currency = Mnb::exchangeRate('EUR');
```

### Resolve by application container

[](#resolve-by-application-container)

```
$currency = app(\Csaba215\Mnb\Laravel\Client::class)->exchangeRate('EUR');
```

### Access refresh date by reference

[](#access-refresh-date-by-reference)

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::exchangeRate("EUR", "2025-04-22");
```

### Available methods

[](#available-methods)

#### Will use cache

[](#will-use-cache)

These methods will use cache.

- exchangeRate($code, $date = null): single Currency
- currentExchangeRates(): array of currencies
- currencies(): array of strings (each is currency code)
- hasCurrency($code): bool

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance49

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

373d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a55d2473b2b80aab54203c548032872028987e875a4889a66f9b6a2c0c265aa0?d=identicon)[csaba215](/maintainers/csaba215)

---

Top Contributors

[![csaba215](https://avatars.githubusercontent.com/u/11250204?v=4)](https://github.com/csaba215 "csaba215 (27 commits)")[![sykorax](https://avatars.githubusercontent.com/u/5334912?v=4)](https://github.com/sykorax "sykorax (6 commits)")

---

Tags

laravelcurrencypackageBankRateexchangemagyarmnbnemzeti

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/csaba215-laravel-mnb/health.svg)

```
[![Health](https://phpackages.com/badges/csaba215-laravel-mnb/health.svg)](https://phpackages.com/packages/csaba215-laravel-mnb)
```

###  Alternatives

[torann/currency

This provides Laravel with currency functions such as currency formatting and conversion using up-to-date exchange rates.

4081.1M6](/packages/torann-currency)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
