PHPackages                             casinelli/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. casinelli/currency

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

casinelli/currency
==================

Handles currency for Laravel 5.

v1.1.2(9y ago)1911.8k8[1 PRs](https://github.com/Casinelli/Currency/pulls)BSD 2-ClausePHPPHP &gt;=5.4.0

Since Nov 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Casinelli/Currency)[ Packagist](https://packagist.org/packages/casinelli/currency)[ RSS](/packages/casinelli-currency/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (12)Used By (0)

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/40b00fe043d38b51a6649dfc1337e0d1019aa6a4e8da597b4af6bd788aa2363c/68747470733a2f2f706f7365722e707567782e6f72672f636173696e656c6c692f63757272656e63792f762f737461626c652e706e67)](https://packagist.org/packages/casinelli/currency) [![Total Downloads](https://camo.githubusercontent.com/ed0f382c8a0745d3515a4b6652cff549c65f7de2273c024df49e4aeaa8abd29d/68747470733a2f2f706f7365722e707567782e6f72672f636173696e656c6c692f63757272656e63792f646f776e6c6f6164732e706e67)](https://packagist.org/packages/casinelli/currency)

Handles currency for Laravel 5.

---

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

[](#installation)

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

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

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

```

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' => [

    Casinelli\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' => Casinelli\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.

### Cleanup

[](#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

```

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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 58.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 ~128 days

Recently: every ~165 days

Total

10

Last Release

3397d ago

Major Versions

0.1.3 → v1.0.02015-04-09

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

v1.0.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/33734d2ae6af79b0ab00f7e48012325d3f8114d7c2f1410580ad1ca67637f86c?d=identicon)[Casinelli](/maintainers/Casinelli)

---

Top Contributors

[![Casinelli](https://avatars.githubusercontent.com/u/3205510?v=4)](https://github.com/Casinelli "Casinelli (30 commits)")[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (11 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)")[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (1 commits)")[![pjona](https://avatars.githubusercontent.com/u/170732?v=4)](https://github.com/pjona "pjona (1 commits)")[![Tapha](https://avatars.githubusercontent.com/u/174484?v=4)](https://github.com/Tapha "Tapha (1 commits)")[![TomCaserta](https://avatars.githubusercontent.com/u/592309?v=4)](https://github.com/TomCaserta "TomCaserta (1 commits)")[![billmn](https://avatars.githubusercontent.com/u/779534?v=4)](https://github.com/billmn "billmn (1 commits)")

---

Tags

laravelmoneycurrencylaravel5exchange rate

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/casinelli-currency/health.svg)](https://phpackages.com/packages/casinelli-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)

PHPackages © 2026

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