A Laravel Nova field.

v1.0.1 2018-09-26 18:33 UTC

This package is auto-updated.

Last update: 2020-10-22 16:53:26 UTC


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

screenshot 1

2. Detailed view

screenshot 1

3. Form view

screenshot 1


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 [
        // ...
                        // 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