Skip to content

A Laravel Nova tool to view and edit application settings.

License

Notifications You must be signed in to change notification settings

ajmariduena/nova-settings-tool

 
 

Repository files navigation

A Laravel Nova tool to manage app settings

Latest Version on Packagist License: MIT StyleCI

Store and edit simple app-wide settings right in Nova. Settings are stored as JSON using spatie/valuestore, making them really easy to pull in and use everywhere else in your app.

Settings Tool screenshot

Installation

Install the package in any Laravel app that uses Nova via composer:

composer require bakerkretzmar/nova-settings-tool

Publish the included default configuration file to config/settings.php (optional, see below):

php artisan vendor:publish --tag="settings-tool"

Register the tool with Nova in the tools method of your NovaServiceProvider:

// in app/Providers/NovaServiceProvider.php

use Ajmariduena\SettingsTool\SettingsTool;

// ...

public function tools()
{
    return [
        new SettingsTool,
    ];
}

Usage

Settings can be declared using a settings.php file in your app's config folder. This file lets you specify where your settings are stored, what the tool's title is in Nova's sidebar, the layout of the settings page, and information about the settings themselves.

This package includes a default config file that you can publish and use as a starting point:

php artisan vendor:publish --tag="settings-tool"

The default config contains examples that should be pretty self-explanatory, and lots of comments in case they aren't.

Each item in the panels array is rendered as its own 'group' of settings, like a panel on one of Nova's detail views. Each panel can have a name and contain settings, which are rendered as toggle switches or text inputs. Each setting can optionally have a description and a link to more information (e.g. docs). Only the setting's key and value are actually stored in your settings.json file.

Testing

composer test

I'm new to testing and would welcome testing-related PRs.

Changelog

Please see the CHANGELOG for information about 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.

License

This package is licensed under the MIT License (MIT). Please see the LICENSE for details.

About

A Laravel Nova tool to view and edit application settings.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 62.1%
  • PHP 32.7%
  • HTML 4.2%
  • JavaScript 1.0%