nsavinov/nova-percent-field
Composer 安装命令:
composer require nsavinov/nova-percent-field
包简介
A Laravel Nova field.
README 文档
README
Laravel Nova field for displaying percents
Usually percents are stored in the database in a decimal form (e.g. 0.1615 which equals to 16.15%). In order to simplify formatting one can use this package.
1. Index view
2. Detailed view
3. Form view
Installation
You can install the package into a Laravel app that uses Nova via composer:
composer require nsavinov/nova-percent-field
Usage
Inside the resource:
use Nsavinov\NovaPercentField\Percent; public function fields(Request $request) { return [ // ... Percent::make('Rate') // possible options ->storedInDecimal(true) // true by default (converts 0.15 to 15.00) ->precision(2) // digits after dot ->storedInDecimal(false) // for displaying raw value from database ->displayPercentSign(true) // true by default ]; }
统计信息
- 总下载量: 279.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-25


