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

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

restuniverse/currency
=====================

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

v2.3(3y ago)1348BSD-2-ClausePHPPHP ^7.2|^8.0

Since Dec 9Pushed 3y agoCompare

[ Source](https://github.com/notchpay/currency)[ Packagist](https://packagist.org/packages/restuniverse/currency)[ RSS](/packages/restuniverse-currency/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

Rest Universe Currency
======================

[](#rest-universe-currency)

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

[](#installation)

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

### Composer

[](#composer)

From the command line run:

```
$ composer require restuniverse/currency
```

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

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

```
php artisan vendor:publish --provider="RestUniverse\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
```

> note: Add your API\_KEY to the .env file with (REST\_UNIVERSE\_API\_KEY).

Basic usage
-----------

[](#basic-usage)

The simplest way to use these methods is through the helper function `currency()` or by using the facade. For the examples below we will use the helper method.

```
currency($amount, $from = null, $to = null, $format = true)
```

**Arguments:**

`$amount` - The float amount to convert `$from` - The current currency code of the amount. If not set, the application default will be used (see `config/currency.php` file). `$to` - The currency code to convert the amount to. If not set, the user-set currency is used. `$format` - Should the returned value be formatted.

**Usage:**

```
echo currency(12.00);               // Will format the amount using the user selected currency
echo currency(12.00, 'USD', 'EUR'); // Will format the amount from the default currency to EUR
```

### Updating Exchange Rates

[](#updating-exchange-rates)

Update exchange rates from restuniverse.com. An API key is needed to use [Rest Universe](http://restuniverse.com). Add yours to the config file.

```
php artisan currency:hydrate
```

Security
--------

[](#security)

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

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~39 days

Recently: every ~58 days

Total

7

Last Release

1432d ago

Major Versions

v1.2 → v2.02022-01-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20987014?v=4)[Chapdel KAMGA](/maintainers/chapdel)[@chapdel](https://github.com/chapdel)

---

Top Contributors

[![chapdel](https://avatars.githubusercontent.com/u/20987014?v=4)](https://github.com/chapdel "chapdel (3 commits)")

---

Tags

laravelmoneycurrencyopenexchangeratesfinanceexchange rateExchange Rates API

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[torann/currency

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

4031.1M6](/packages/torann-currency)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k90.5k1](/packages/mike-bronner-laravel-model-caching)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21111.6k](/packages/iazaran-smart-cache)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

19267.9k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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