williamug / money-formatter
This package helps you format currancy by adding commas
Installs: 1 199
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- nunomaduro/collision: ^7.0
- orchestra/testbench: ^8.8
- phpunit/phpunit: ^10.0
README
A Simple way to format digits into currency/ money format.
Installation
Note: before using the package, make sure that you have intl extension installed. Click here to follow the steps
You can install the package via composer:
composer require williamug/money-formatter
Usage
Use @money
directive in your blade templates. Replace 10000
with any value or variable.
Example
@money(10000) // 10,000.00 @money(123000) // 123,000.00
If you want to convert an integer or amount of money into words. Use @numbertowords
directive in your blade files.
Example:
@numbertowords(10000) // ten thousand @numbertowords(123000) // one hundred twenty-three thousand
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.