wiwatsrt/nova-number-field

A Laravel Nova field.

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

This package is auto-updated.

Last update: 2024-12-12 05:19:49 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'),

            // ...
        ];
    }
}