idez/nova-percent-field

A Laravel Nova percent field.

1.1.0 2022-09-30 20:32 UTC

This package is auto-updated.

Last update: 2024-03-29 04:46:36 UTC


README

License Latest Stable Version Total Downloads

About

This is a Laravel Nova 4 custom field for percent values.

Requirements

  • php: ^7.4|^8.0|^8.1

Installation

To install the custom field run the following command in your Laravel Nova project:

composer require idez/nova-percent-field

Usage

Simply add this field in your Nova resource.

use Idez\NovaPercentField\Percent;
use Laravel\Nova\Http\Requests\NovaRequest;

class CustomResource extends Resource
{
    public function fields(NovaRequest $request): array
    {
        return [
            Percent::make('Label', 'field'),
        ];
    }
}

Contributing

Contributions are welcome, explain the issue/feature that you want to solve/add and back your code up with tests. Happy coding!

License

This package was originally developed by https://github.com/NikolaySav/nova-percent-field however they have abandoned the package. The MIT License (MIT). Please see License File for more information.