PHPackages                             mkraha/laravel-currency-converter - 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. mkraha/laravel-currency-converter

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

mkraha/laravel-currency-converter
=================================

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

1.5.5(4y ago)017BSD-2-ClausePHPPHP ^7.2|^8.0

Since Nov 29Pushed 4y agoCompare

[ Source](https://github.com/mkraha/LaravelCurrencyConverter)[ Packagist](https://packagist.org/packages/mkraha/laravel-currency-converter)[ RSS](/packages/mkraha-laravel-currency-converter/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (6)Dependencies (8)Versions (39)Used By (0)

Currency for Laravel
====================

[](#currency-for-laravel)

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

- [Currency on Packagist](https://packagist.org/packages/mkraha/laravel-currency-converter)
- [Currency on GitHub](https://github.com/mkraha/LaravelCurrencyConverter)

### Composer

[](#composer)

From the command line run:

```
$ composer require mkraha/laravel-currency-converter
```

### Laravel's &gt;=5.5 Auto-Discovery

[](#laravels-55-auto-discovery)

Simply install the package and let Laravel do its magic.

### Manual Setup

[](#manual-setup)

Once installed you need to register the service provider with the application. Open up `config/app.php` and find the `providers` key.

```
'providers' => [

    \Raha\Currency\CurrencyServiceProvider::class,

]
```

This package also comes with a facade, which provides an easy way to call the the class. Open up `config/app.php` and find the `aliases` key.

```
'aliases' => [

    'Currency' => \Raha\Currency\Facades\Currency::class,

];
```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
php artisan vendor:publish --provider="Raha\Currency\CurrencyServiceProvider" --tag=config
```

A configuration file will be published to `config/currency.php`.

### Migration

[](#migration)

If currencies are going to be stored in the database. Run migrate to setup the database table \[see [Storage Drivers](/projects/laravel-currency/doc/storage-drivers.html)\].

```
php artisan vendor:publish --provider="Raha\Currency\CurrencyServiceProvider" --tag=migrations
```

Run this on the command line from the root of your project to generate the table for storing currencies:

```
$ php artisan migrate
```

### Preset Currencies

[](#preset-currencies)

The package comes with a set of preset currencies. To add them use the [artisan manage command](/projects/laravel-currency/doc/commands.html).

### Middleware

[](#middleware)

Once installed you need to append the middleware class within the Http kernel. This allows visitors to change the viewed currency using the query parameter `?currency=usd`.

Open up `app/Http/Kernel.php` and find the `$middleware` variable.

```
protected $middleware = [

    \Raha\Currency\Middleware\CurrencyMiddleware::class,

]
```

> **Note:** The currency middleware uses the session to store the user selected currency, because of this the middleware will need to be added somewhere after `\Illuminate\Session\Middleware\StartSession::class`.

Official Author Documentation
-----------------------------

[](#official-author-documentation)

Documentation for the package can be found on [Lyften.com](http://lyften.com/projects/laravel-currency/).

Change Log
----------

[](#change-log)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 73.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

Every ~82 days

Recently: every ~0 days

Total

38

Last Release

1500d ago

Major Versions

0.3.x-dev → 1.0.x-dev2016-10-04

0.1.x-dev → 1.0.22016-10-08

PHP version history (5 changes)0.1.0PHP &gt;=5.3.0

0.2.0PHP &gt;=5.5.9

1.1.0PHP ^7.2

1.1.1PHP &gt;=7.2

1.5.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/17869f5cec3d8dcbd23637d9583c0879fa13b0c25a84d74f16993c488528f8df?d=identicon)[rmk](/maintainers/rmk)

---

Top Contributors

[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (93 commits)")[![umbertix](https://avatars.githubusercontent.com/u/708948?v=4)](https://github.com/umbertix "umbertix (4 commits)")[![kwolniak](https://avatars.githubusercontent.com/u/302761?v=4)](https://github.com/kwolniak "kwolniak (4 commits)")[![henzel](https://avatars.githubusercontent.com/u/6071449?v=4)](https://github.com/henzel "henzel (3 commits)")[![mkraha](https://avatars.githubusercontent.com/u/6831562?v=4)](https://github.com/mkraha "mkraha (3 commits)")[![joe-pritchard](https://avatars.githubusercontent.com/u/25373032?v=4)](https://github.com/joe-pritchard "joe-pritchard (2 commits)")[![MartinJac](https://avatars.githubusercontent.com/u/10448099?v=4)](https://github.com/MartinJac "MartinJac (2 commits)")[![hardevine](https://avatars.githubusercontent.com/u/1171618?v=4)](https://github.com/hardevine "hardevine (2 commits)")[![nCrazed](https://avatars.githubusercontent.com/u/507466?v=4)](https://github.com/nCrazed "nCrazed (1 commits)")[![putchi](https://avatars.githubusercontent.com/u/10920796?v=4)](https://github.com/putchi "putchi (1 commits)")[![sudden-break](https://avatars.githubusercontent.com/u/1845379?v=4)](https://github.com/sudden-break "sudden-break (1 commits)")[![vaniyokk](https://avatars.githubusercontent.com/u/1783210?v=4)](https://github.com/vaniyokk "vaniyokk (1 commits)")[![alberto-bottarini](https://avatars.githubusercontent.com/u/1442934?v=4)](https://github.com/alberto-bottarini "alberto-bottarini (1 commits)")[![veneliniliev](https://avatars.githubusercontent.com/u/5311085?v=4)](https://github.com/veneliniliev "veneliniliev (1 commits)")[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (1 commits)")[![billmn](https://avatars.githubusercontent.com/u/779534?v=4)](https://github.com/billmn "billmn (1 commits)")[![harlekoy](https://avatars.githubusercontent.com/u/10015302?v=4)](https://github.com/harlekoy "harlekoy (1 commits)")[![hiyahin](https://avatars.githubusercontent.com/u/7233265?v=4)](https://github.com/hiyahin "hiyahin (1 commits)")[![imbrish](https://avatars.githubusercontent.com/u/8572846?v=4)](https://github.com/imbrish "imbrish (1 commits)")[![Leonigas](https://avatars.githubusercontent.com/u/11074677?v=4)](https://github.com/Leonigas "Leonigas (1 commits)")

---

Tags

laravelmoneycurrencyopenexchangeratesfinanceexchange rateExchange Rates API

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mkraha-laravel-currency-converter/health.svg)

```
[![Health](https://phpackages.com/badges/mkraha-laravel-currency-converter/health.svg)](https://phpackages.com/packages/mkraha-laravel-currency-converter)
```

###  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)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)

PHPackages © 2026

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