wiwatsrt/nova-number-field

A Laravel Nova field.

dev-master 2018-11-11 11:18 UTC

README

use numeral.js for formatted number

Installation

composer require wiwatsrt/nova-number-field

Usage

namespace App\Nova;

use Wiwatsrt\NovaNumberField\NovaNumberField as Currency;

class Invoice extends Resource
{
    // ...
    
    public function fields(Request $request)
    {
        return [
            // ...
            
            Currency::make('Subtotal')
                ->format('0,0.00'),

            // ...
        ];
    }
}