wiwatsrt/nova-number-field

A Laravel Nova field.

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

This package is auto-updated.

Last update: 2024-11-12 05:06:22 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'),

            // ...
        ];
    }
}