PHPackages                             finller/laravel-forex - 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. finller/laravel-forex

Abandoned → [elegantly/laravel-forex](/?search=elegantly%2Flaravel-forex)Library[Utility &amp; Helpers](/categories/utility)

finller/laravel-forex
=====================

Forex for Laravel

v4.0.2(1w ago)42.4kMITPHPPHP ^8.3CI passing

Since Mar 3Pushed 1w agoCompare

[ Source](https://github.com/ElegantEngineeringTech/laravel-forex)[ Packagist](https://packagist.org/packages/finller/laravel-forex)[ Docs](https://github.com/ElegantEngineeringTech/laravel-forex)[ GitHub Sponsors](https://github.com/ElegantEngineeringTech)[ RSS](/packages/finller-laravel-forex/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (68)Versions (29)Used By (0)

Laravel Forex
=============

[](#laravel-forex)

[![Latest Version on Packagist](https://camo.githubusercontent.com/639aa6e1917351c8dac2f6c9ba933af7f378da3f479a35a9267730ec5bf7a98e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6567616e746c792f6c61726176656c2d666f7265782e737667)](https://packagist.org/packages/elegantly/laravel-forex)[![Total Downloads](https://camo.githubusercontent.com/b0b2f276486b0dafc5b1fb00f900efec1272ac26dc04d6eb3b674a15615d7eaa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6567616e746c792f6c61726176656c2d666f7265782e737667)](https://packagist.org/packages/elegantly/laravel-forex)[![Tests](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/run-tests.yml/badge.svg)](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/run-tests.yml)[![Laravel Pint](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/pint.yml/badge.svg)](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/pint.yml)[![PHPStan](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/phpstan.yml/badge.svg)](https://github.com/ElegantEngineeringTech/laravel-forex/actions/workflows/phpstan.yml)

**Laravel Forex** is a simple and flexible package for retrieving the latest and historical foreign exchange rates in your Laravel application.

By default, it uses the free tier from [exchangerate-api.com](https://www.exchangerate-api.com/), but you can easily configure it to use any other Forex provider.

---

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

[](#installation)

Install via Composer:

```
composer require elegantly/laravel-forex
```

Publish the configuration file:

```
php artisan vendor:publish --tag="forex-config"
```

---

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

[](#configuration)

Here’s the default configuration that will be published to `config/forex.php`:

```
use Elegantly\Forex\Integrations\ExchangeRateApiFree\ExchangeRateApiFreeConnector;

return [

    /**
     * Rounding mode used when converting money
     */
    'rounding_mode' => RoundingMode::HalfUp,

    'cache' => [
        'enabled' => true,
        'driver' => env('FOREX_CACHE_DRIVER', env('CACHE_STORE', env('CACHE_DRIVER', 'file'))),
        'expiry_seconds' => 86_400, // 1 day
    ],

    'rate_limit' => [
        'enabled' => false,
        'driver' => env('FOREX_RATE_LIMIT_DRIVER', env('CACHE_STORE', env('CACHE_DRIVER', 'file'))),
        'every_seconds' => 3_600, // 1 hour
    ],

    'client' => ExchangeRateApiFreeConnector::class,

    'clients' => [
        'exchange-rate-api' => [
            'token' => env('EXCHANGE_RATE_API_TOKEN'),
        ],
    ],

];
```

---

Usage
-----

[](#usage)

### Get Latest Rates

[](#get-latest-rates)

```
use Elegantly\Forex\Facades\Forex;

$rates = Forex::latest('USD');

$usdToEur = $rates['EUR'];
```

### Get Historical Rates

[](#get-historical-rates)

```
use Carbon\Carbon;
use Elegantly\Forex\Facades\Forex;

$rates = Forex::rates(Carbon::create(2022, 4, 25), 'USD');

$usdToEur = $rates['EUR'];
```

### Convert Money Between Currencies

[](#convert-money-between-currencies)

You can easily convert a `Money` instance from one currency to another using the `Forex::convert()` method.

This method ensures high-precision conversions by leveraging the [`brick/money`](https://github.com/brick/money) PHP library.

```
use Elegantly\Forex\Facades\Forex;
use Brick\Money\Money;

$convertedMoney = Forex::convert(
    money: Money::of(100, 'USD'),
    currency: 'EUR',
);

$convertedMoney->__toString(); // (EUR) 88.84
```

---

Testing
-------

[](#testing)

Run the test suite with:

```
composer test
```

---

Changelog
---------

[](#changelog)

See the [CHANGELOG](CHANGELOG.md) for details on recent updates.

---

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

[](#contributing)

Contributions are welcome! Please read the [CONTRIBUTING](CONTRIBUTING.md) guide for details.

---

Security
--------

[](#security)

If you discover any security-related issues, please refer to our [security policy](../../security/policy).

---

Credits
-------

[](#credits)

- [Quentin Gabriele](https://github.com/QuentinGab)
- [All Contributors](../../contributors)

---

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE.md).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance98

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 73.5% 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 ~34 days

Recently: every ~14 days

Total

26

Last Release

8d ago

Major Versions

v1.2.0 → v2.0.02025-04-16

v2.5.1 → v3.0.02026-05-02

v3.0.0 → v4.0.02026-05-02

PHP version history (2 changes)v1.0.0PHP ^8.1

v4.0.1PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![QuentinGab](https://avatars.githubusercontent.com/u/40128136?v=4)](https://github.com/QuentinGab "QuentinGab (75 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

exchange-ratesforexlaravellaravel-packagelaravelElegantlylaravel-forex

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/finller-laravel-forex/health.svg)

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

###  Alternatives

[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[codebar-ag/laravel-zammad

Zammad integration with Laravel

107.1k](/packages/codebar-ag-laravel-zammad)

PHPackages © 2026

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