williamug / money-formatter
此包通过添加逗号帮助您格式化货币
2.0.1
2023-09-30 09:11 UTC
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
将数字格式化为货币/金钱格式的一种简单方法。
安装
注意:在使用此包之前,请确保已安装intl扩展。点击这里查看步骤
您可以通过composer安装此包
composer require williamug/money-formatter
用法
在您的blade模板中使用@money指令。将10000替换为任何值或变量。
示例
@money(10000) // 10,000.00 @money(123000) // 123,000.00
如果您想将整数或货币金额转换为文字。在您的blade文件中使用@numbertowords指令。
示例
@numbertowords(10000) // ten thousand @numbertowords(123000) // one hundred twenty-three thousand
测试
composer test
变更日志
请参阅CHANGELOG以获取有关最近更改的更多信息。
安全漏洞
请审查我们的安全策略以了解如何报告安全漏洞。
致谢
许可
MIT许可证(MIT)。请参阅许可文件以获取更多信息。