Download the PHP package cleaniquecoders/money-wrapper without Composer
On this page you can find all versions of the php package cleaniquecoders/money-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package money-wrapper
MoneyPHP Wrapper
This is a wrapper for Money.
This wrapper:
- Provide a Money helper -
money()
- Intended for Laravel Framework, but can be use outside from Laravel Framework as well.
- Provide common usage such as:
- [x] For Human Readability - RM 1.00, RM 345.00
- [x] For Common Display - 1.00, 345.00
- [x] For Machine (intended format to store in Database - integer) - 100, 34500
- [x] Fixed Exchange Rate Conversion - $ 1 > RM 3.87
Installation
-
In order to install
cleaniquecoders/money-wrapper
in your Laravel project, just run the composer require command from your terminal: -
Then in your
config/app.php
add the following to the providers array: -
In the same
config/app.php
add the following to the aliases array: - Publish Money Wrapper Config:
You may want to add more currency details based on country. See contributions section below for the details.
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.
You can add more currencies after publishing the Money Wrapper configuration file and added more supported currencies.
Please refer to Country Code and it's currency swift code and symbol in Currency List.
Get Money Format
Convert Fixed Rate
Recommended data type used in database is big integer
Contributions
Updating currency list (config/currency.php
) available based on following resources:
- Use Country ISO Alpha 2 Code for the Key as defined in Country List.
- Refer currency list for the available currency.
- Use symbol as per stated in www.xe.com.
The structure will be as following:
License
This package is open-sourced software licensed under the MIT license.
All versions of money-wrapper with dependencies
illuminate/support Version ^5.5|^5.6|^5.7|^5.8
moneyphp/money Version ^3.1