PHPackages                             cleaniquecoders/money-wrapper - 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. cleaniquecoders/money-wrapper

AbandonedArchivedLibrary

cleaniquecoders/money-wrapper
=============================

MoneyPHP Wrapper

v1.2.0(7y ago)106326[2 PRs](https://github.com/cleaniquecoders/money-wrapper/pulls)1MITPHPPHP &gt;=7.2

Since Aug 15Pushed 4y agoCompare

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

READMEChangelog (5)Dependencies (5)Versions (8)Used By (1)

[![Build Status](https://camo.githubusercontent.com/a80a1bb0f2010540c797bc5a25937f44c8d6d04cf23819ae10ff9fdfc835b418/68747470733a2f2f7472617669732d63692e6f72672f636c65616e69717565636f646572732f6d6f6e65792d777261707065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cleaniquecoders/money-wrapper) [![Latest Stable Version](https://camo.githubusercontent.com/171778eafa090284a6d878af4201ae7dc59e6fba76f4563db574c8018732cc4f/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6d6f6e65792d777261707065722f762f737461626c65)](https://packagist.org/packages/cleaniquecoders/money-wrapper) [![Total Downloads](https://camo.githubusercontent.com/f23ac908ef2786e7db8c34fe79f2bc6400bfaaa31e9221c29da6f10a61439a62/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6d6f6e65792d777261707065722f646f776e6c6f616473)](https://packagist.org/packages/cleaniquecoders/money-wrapper) [![License](https://camo.githubusercontent.com/a729be67ce98d5bd121fbd00a80cbae26550cdf874fb8a21443c5355abf4053d/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f6d6f6e65792d777261707065722f6c6963656e7365)](https://packagist.org/packages/cleaniquecoders/money-wrapper)

MoneyPHP Wrapper
----------------

[](#moneyphp-wrapper)

This is a wrapper for [Money](https://github.com/moneyphp/money).

This wrapper:

1. Provide a Money helper - `money()`
2. Intended for Laravel Framework, but can be use outside from Laravel Framework as well.
3. Provide common usage such as:

- For Human Readability - RM 1.00, RM 345.00
- For Common Display - 1.00, 345.00
- For Machine (intended format to store in Database - integer) - 100, 34500
- Fixed Exchange Rate Conversion - $ 1 &gt; RM 3.87

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

[](#installation)

1. In order to install `cleaniquecoders/money-wrapper` in your Laravel project, just run the *composer require* command from your terminal:

```
$ composer require cleaniquecoders/money-wrapper

```

2. Then in your `config/app.php` add the following to the providers array:

```
CleaniqueCoders\MoneyWrapper\MoneyWrapperServiceProvider::class,
```

3. In the same `config/app.php` add the following to the aliases array:

```
'MoneyWrapper' => CleaniqueCoders\MoneyWrapper\MoneyWrapperFacade::class,
```

4. Publish Money Wrapper Config:

```
$ php artisan vendor:publish --tag=money-wrapper-config

```

> You may want to add more currency details based on country. See contributions section below for the details.

Usage
-----

[](#usage)

**Get Money Wrapper Instance**

By default, MYR, Malaysia Ringgit currency will be use.

You may override either by `.env` file or pass the country Alpha 2 code when calling `money()` helper.

```
$money = money(); // by default it will use MY
$moneyUsd = money('US'); // pass the country code - ISO Alpha 2
```

You can add more currencies after publishing the Money Wrapper configuration file and added more supported currencies.

Please refer to [Country Code](http://www.nationsonline.org/oneworld/country_code_list.htm) and it's currency swift code and symbol in [Currency List](http://www.xe.com/iso4217.php).

**Get Money Format**

```
echo money()->toHuman(100); // RM 1.00, useful for human readability
echo money()->toCommon(100); // 1.00
echo money()->toMachine('1.00'); // 100, always store in database as integer.
```

**Convert Fixed Rate**

```
$fixedExchange = [
    'MYR' => [
        'USD' => 3.87,
    ],
];
echo money()->convertFixedRate($fixedExchange, 100, 'USD')->getAmount(); // 387
```

> Recommended data type used in database is big integer

Contributions
-------------

[](#contributions)

Updating currency list (`config/currency.php`) available based on following resources:

1. Use Country ISO Alpha 2 Code for the Key as defined in [Country List](http://www.nationsonline.org/oneworld/country_code_list.htm).
2. Refer [currency list](http://www.xe.com/iso4217.php) for the available currency.
3. Use symbol as per stated in [www.xe.com](http://www.xe.com/symbols.php).

The structure will be as following:

```
[
	'MYR' => [
		'swift_code' => 'MYR',
		'symbol' => 'RM'
	]
]
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 91.9% 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 ~49 days

Total

5

Last Release

2629d ago

PHP version history (2 changes)v1.0.1PHP &gt;=7.1

v1.2.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (34 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![EcoinTest](https://avatars.githubusercontent.com/u/153815470?v=4)](https://github.com/EcoinTest "EcoinTest (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

frameworklaravelmoneymoneyphpwrapperphplaravelmoneypackagewrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cleaniquecoders-money-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/cleaniquecoders-money-wrapper/health.svg)](https://phpackages.com/packages/cleaniquecoders-money-wrapper)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[nunomaduro/laravel-desktop-notifier

Send notifications to your desktop from your Laravel commands. An JoliNotif wrapper for Laravel 5.

4781.7M8](/packages/nunomaduro-laravel-desktop-notifier)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16553.3k1](/packages/php-tmdb-laravel)

PHPackages © 2026

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