PHPackages                             mchervenkov/bnbfixing - 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. mchervenkov/bnbfixing

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

mchervenkov/bnbfixing
=====================

Laravel BNB Fixing XML Wrapper

1.0.3(1mo ago)02.6k↓41.3%MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Jul 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gdinko/bnbfixing)[ Packagist](https://packagist.org/packages/mchervenkov/bnbfixing)[ Docs](https://github.com/gdinko/bnbfixing)[ RSS](/packages/mchervenkov-bnbfixing/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (5)Used By (0)

BNB Fixing XML Wrapper
======================

[](#bnb-fixing-xml-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/055968d321d84e338b57047a9abb92f54297372ae49159b984d9c6b03faaf22b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6368657276656e6b6f762f626e62666978696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mchervenkov/bnbfixing)[![Total Downloads](https://camo.githubusercontent.com/f3522941562205645004f2d0769aecc01344ef3b4142efaf18ff26293f03b85e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6368657276656e6b6f762f626e62666978696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mchervenkov/bnbfixing)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mchervenkov/bnbfixing
```

If you plan to use database for storing bnb exchange rates:

```
php artisan migrate
```

If you need to export configuration file:

```
php artisan vendor:publish --tag=bnbfixing-config
```

If you need to export migrations:

```
php artisan vendor:publish --tag=bnbfixing-migrations
```

If you need to export models:

```
php artisan vendor:publish --tag=bnbfixing-models
```

If you need to export commands:

```
php artisan vendor:publish --tag=bnbfixing-commands
```

Usage
-----

[](#usage)

Methods

```
// Init BnbFixing Client
$bnbFixing = new BnbFixing();

// Return Bnb exchange rates in xml string format
$bnbFixing->getXmlContent();

// Get Certain exchange rate by code for certain bulgarian lev amount
// This will return how much Euro are 100 bulgarian lev
$bnbFixing->geExchangeBGNRateAmount('EUR', 100);

// Get Bulgarian Lev Rate for certain exchange rate and amount
// This will return how much bulgarian lev are 100 Euro
$bnbFixing->getReverseExchangeBGNRateAmount('EUR', 100);

// Get Amount between two exchange rates depends on BNB Fixings
// This will return how much euro are 100 american dollars
$bnbFixing->getExchangeRate('USD', 'EUR', 100);
```

Commands

```
#get exchange rates and insert them into database
php artisan bnb-fixing:sync-bnbfixing
```

Models

```
BnbFixing
```

Examples
--------

[](#examples)

Get xml content

```
$bnbFixing = new BnbFixing();
$xmlContent = $bnbFixing->getXmlContent();
dd($xmlContent);
```

Certain Exchange rate from bulgarian lev amount (100 Bulgarian lev to American dollars)

```
$bnbFixing = new BnbFixing();
$usd = $bnbFixing->getExchangeRateAmount('USD', 100);
dd($usd);
```

Certain Exchange rate to bulgarian lev (100 American Dollars to Lev)

```
$bnbFixing = new BnbFixing();
$lev = $bnbFixing->getReverseExchangeRateAmount('USD', 100);
dd($lev)
```

### Testing

[](#testing)

Before running tests config xml\_url in phpunit.xml file

```

```

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mario Chervenkov](https://github.com/mariochervenkov)
- [silabg.com](https://www.silabg.com/) ❤️
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance58

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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

Every ~205 days

Total

4

Last Release

53d ago

PHP version history (2 changes)1.0.0PHP ^8.0|^8.1|^8.2

1.0.3PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

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

---

Top Contributors

[![mariochervenkov](https://avatars.githubusercontent.com/u/48062373?v=4)](https://github.com/mariochervenkov "mariochervenkov (6 commits)")[![gdinko](https://avatars.githubusercontent.com/u/2735905?v=4)](https://github.com/gdinko "gdinko (1 commits)")

---

Tags

laravelbnbmchervenkovfixingbnb fixingbnb laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/mchervenkov-bnbfixing/health.svg)

```
[![Health](https://phpackages.com/badges/mchervenkov-bnbfixing/health.svg)](https://phpackages.com/packages/mchervenkov-bnbfixing)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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