sashalenz/nova-money-field

A Laravel Nova field for Money.

1.0.1 2020-08-23 13:33 UTC

This package is auto-updated.

Last update: 2024-10-23 22:38:14 UTC


README

Latest Version on Packagist Total Downloads

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require sashalenz/nova-money-field

Usage

In resource:

// ...
use Sashalenz\NovaMoneyField\Money;

public function fields(Request $request)
{
    return [
        // ...
        Money::make('Balance'),
    ];
}

You may use locale method to define locale for formatting value, by default value will be formatted using browser locale:

Money::make('Balance')->locale('ru-RU'),