| Package Data | |
|---|---|
| Maintainer Username: | nsavinov |
| Package Create Date: | 2018-09-25 |
| Package Last Update: | 2024-08-06 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-20 15:08:30 |
| Package Statistics | |
|---|---|
| Total Downloads: | 271,462 |
| Monthly Downloads: | 1,055 |
| Daily Downloads: | 2 |
| Total Stars: | 21 |
| Total Watchers: | 1 |
| Total Forks: | 6 |
| Total Open Issues: | 3 |
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.



You can install the package into a Laravel app that uses Nova via composer:
composer require nsavinov/nova-percent-field
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
];
}