A Laravel Nova field for Money.

Installs: 427 853

Dependents: 1

Suggesters: 0

Security: 0

Stars: 68

Watchers: 3

Forks: 27

Open Issues: 15


v2.0.0 2022-07-19 21:33 UTC


Latest Version on Packagist Total Downloads

screenshot 1


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

composer require vyuldashev/nova-money-field


In resource:

// ...
use Vyuldashev\NovaMoneyField\Money;

public function fields(Request $request)
    return [
        // ...

USD currency is used by default, you can change this by passing second argument:

Money::make('Balance', 'EUR'),

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


If you store money values in database in minor units use storedInMinorUnits method. Field will automatically convert minor units to base value for displaying and to minor units for storing:

Money::make('Balance', 'EUR')->storedInMinorUnits(),

If you need to use a name that doesn't convert to the column name (eg 'Balance' as name and remaining_balance as column) you can pass this as the 3rd argument to the make/constructor.

Please Note: that this, along with all field column names, should be present and usable within your model class else you may encounter SQL errors.

Money::make('Balance', 'EUR', 'remaining_balance'),