bluebaytravel / dosh
PHP 简单货币格式化工具。
v3.0.1
2020-08-05 13:40 UTC
Requires
- php: ^7.0
- illuminate/contracts: ^5|^6|^7
- illuminate/support: ^5|^6|^7
Requires (Dev)
- graham-campbell/testbench: ^3.1
- phpunit/phpunit: ^4.8|^5.0
This package is not auto-updated.
Last update: 2024-09-14 19:47:30 UTC
README
// Parse a document. $dosh = new Dosh(Dosh::GBP); $dosh->format('25.43'); // £25.430 // Dependency injection example. $dosh->format("100"); // Change currency $dosh = new Dosh(Dosh::USD); $dosh->format("100"); // $100
安装
使用 Composer 在项目根目录中安装此包。
composer require bluebaytravel/dosh
Laravel 安装
将服务提供者添加到 config/app.php
文件中的 providers
数组。
BlueBayTravel\Dosh\DoshServiceProvider::class
如果您想使用 facade,可以在 config/app.php
文件中将引用添加到您的别名数组中。
'Dosh' => BlueBayTravel\Dosh\Facades\Dosh::class
许可证
Blue Bay Travel Dosh 使用 MIT 许可证 (MIT) 许可。