trendsoft / laravel-capital
基于`trendsoft/capital`的Laravel金额转中文大写
Installs: 2 331
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- illuminate/container: ^7.22
- trendsoft/capital: ^0.1.1
Requires (Dev)
- graham-campbell/analyzer: ^3.0
- graham-campbell/testbench: ^5.5
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-10-29 05:22:25 UTC
README
基于
trendsoft/capital
的Laravel金额转中文大写
要求
- PHP >=7.0
- Composer
安装
$ composer require "trendsoft/laravel-capital" -vvv
配置
Laravel 应用
- 在 config/app.php 注册 ServiceProvider 和 Facade (Laravel 5.5 无需手动注册)
'providers' => [
// ...
LaravelCapital\ServiceProvider::class,
],
'aliases' => [
// ...
'Capital'=>LaravelCapital\Money::class
],
Lumen 应用
在 bootstrap/app.php 中 82 行左右:
$app->register(LaravelCapital\ServiceProvider::class);
使用示例
\LaravelCapital\Money::parse(2003.2) //贰仟零叁元贰角
Contribution
License
MIT