PHPackages                             roaderchik/currency - 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. roaderchik/currency

ActiveLibrary

roaderchik/currency
===================

Handles currency for Laravel 5.8

1.0.5(7y ago)1121BSD-2-ClausePHPPHP &gt;=5.4.0

Since Aug 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Roaderchik/currency)[ Packagist](https://packagist.org/packages/roaderchik/currency)[ RSS](/packages/roaderchik-currency/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

Currency for Laravel 5.8.
=========================

[](#currency-for-laravel-58)

[![Latest Stable Version](https://camo.githubusercontent.com/bda12350b98b0528abde3968a422f61795c1cdf1c5cadb39f4e69d318d5adb9b/68747470733a2f2f706f7365722e707567782e6f72672f726f616465726368696b2f63757272656e63792f762f737461626c65)](https://packagist.org/packages/roaderchik/currency)

Handles currency for Laravel 5.8.

---

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

[](#installation)

- [Currency on Packagist](https://packagist.org/packages/roaderchik/currency)
- [Currency on GitHub](https://github.com/roaderchik/currency)

To get the latest version of Currency simply require it in your `composer.json` file.

```
"roaderchik/currency": "dev-master"

```

```
composer require "roaderchik/currency"

```

You'll then need to run `composer install` to download it and have the autoloader updated.

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

```
'providers' => [

    roaderchik\Currency\CurrencyServiceProvider::class,

]
```

Currency also ships with a facade which provides the static syntax for creating collections. You can register the facade in the `aliases` key of your `app/config/app.php` file.

```
'aliases' => [

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

]
```

Create configuration file and migration table using artisan

```
$ php artisan vendor:publish

```

Artisan Commands
----------------

[](#artisan-commands)

### Updating Exchange

[](#updating-exchange)

By default exchange rates are updated from Finance Yahoo.com.

```
php artisan currency:update

```

To update from OpenExchangeRates.org

```
php artisan currency:update --openexchangerates

```

> Note: An API key is needed to use [OpenExchangeRates.org](http://OpenExchangeRates.org). Add yours to the config file.

```

To update from The Central Bank of the Russian Federation (www.cbr.ru)

```

php artisan currency:update --cbr

```

To update from National Bank of the Republic of Belarus (www.nbrb.by)

```

php artisan currency:update --nbrb

```

### Cleanup

Used to clean the Laravel cached exchanged rates and refresh it from the database. Note that cached exchanged rates are cleared after they are updated using one of the command above.

```

php artisan currency:cleanup

```

## Convert
~~~php
// for example convert USD to EUR
echo /Currency::convert(100, 'USD', 'EUR');

```

- The first parameter is the amount.
- The second parameter is the ISO 4217 From currency code.
- The third parameter is the ISO 4217 To currency code.

Rendering
---------

[](#rendering)

Using the Blade helper

```
@currency(12.00, 'USD')
```

- The first parameter is the amount.
- *optional* The second parameter is the ISO 4217 currency code. If not set it will use the default set in the config file.

```
echo /Currency::format(12.00, 'USD');
```

For easy output of rounded values:

```
echo /Currency::rounded(12.80);  // Will output $12

// All the parameters
echo /Currency::rounded(12.80, 0, 'USD');
```

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

[](#change-log)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~436 days

Total

4

Last Release

2614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/177c0446df045183b65a8ef682ebabacbf485488aec0fa3185f073258affcdbb?d=identicon)[Roaderchik](/maintainers/Roaderchik)

---

Top Contributors

[![Casinelli](https://avatars.githubusercontent.com/u/3205510?v=4)](https://github.com/Casinelli "Casinelli (15 commits)")[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (11 commits)")[![Roaderchik](https://avatars.githubusercontent.com/u/2656279?v=4)](https://github.com/Roaderchik "Roaderchik (6 commits)")[![kwolniak](https://avatars.githubusercontent.com/u/302761?v=4)](https://github.com/kwolniak "kwolniak (4 commits)")[![hiyahin](https://avatars.githubusercontent.com/u/7233265?v=4)](https://github.com/hiyahin "hiyahin (1 commits)")[![billmn](https://avatars.githubusercontent.com/u/779534?v=4)](https://github.com/billmn "billmn (1 commits)")[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (1 commits)")

---

Tags

laravelmoneycurrencylaravel5exchange ratecbrRUBBYRnbrb

### Embed Badge

![Health badge](/badges/roaderchik-currency/health.svg)

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

###  Alternatives

[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[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)[casinelli/currency

Handles currency for Laravel 5.

1911.8k](/packages/casinelli-currency)[torchlight/torchlight-laravel

A Laravel Client for Torchlight, the syntax highlighting API.

120452.8k11](/packages/torchlight-torchlight-laravel)

PHPackages © 2026

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