wiwatsrt/nova-number-field

A Laravel Nova field.

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

This package is auto-updated.

Last update: 2024-10-12 04:56:34 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'),

            // ...
        ];
    }
}