Skip to content

A model-settings field for Laravel Nova

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

Read-Rate/nova-model-settings-field

Repository files navigation

A model-settings field for Laravel Nova

Latest Version on Packagist Total Downloads

This package contains a Nova field to add settings to your models using the laravel-model-settings.

Requirements

This Nova field does not support v4.0.0 of laravel-model-settings yet.

Installation

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

composer require read-rate/nova-model-settings-field

Usage

To add settings to a model you first need to make sure that one of the HasSettingsField, HasSettingsTable, HasSettingsTrait trait is present.

class Book extends Model
{
    
    use Glorand\Model\Settings\Traits\HasSettingsField;
    
    ...
}

Next you can add the new model-settings field to your Nova resource :

namespace App\Nova;

use Readandrate\ModelSettingsField\ModelSettingsField;

class Book extends Resource
{
    // ...
    
    public function fields(Request $request)
    {
        return [
            // ...
            
            ModelSettingsField::make('Model Settings'),

            // ...
        ];
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A model-settings field for Laravel Nova

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published