concept24/nova-settings-tool

A Laravel Nova tool to manage application settings. Fork of bakerkretzmar/nova-settings-tool with Password field support.

Maintainers

Package info

bitbucket.org/concept24/nova-settings-tool

pkg:composer/concept24/nova-settings-tool

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

v1.0.3 2026-03-31 09:08 UTC

This package is auto-updated.

Last update: 2026-03-31 09:08:45 UTC


README

A Laravel Nova 5 tool to manage application settings, stored as JSON via spatie/valuestore.

Forked from bakerkretzmar/nova-settings-tool with additional field types.

What's different from the original

  • Password field type -- values are stored as plain text and masked in the UI
  • Nova 5 compatible -- implements the required menu() method
  • Namespace -- Concept24\NovaSettingsTool

Requirements

  • PHP >= 8.1
  • Laravel Nova >= 5.0
  • spatie/valuestore >= 1.3

Installation

composer require concept24/nova-settings-tool

Publish the config file:

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

Register the tool in NovaServiceProvider:

use Concept24\NovaSettingsTool\SettingsTool;

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

Configuration

Settings are defined in config/nova-settings-tool.php:

return [
    'path' => storage_path('app/settings.json'),
    'sidebar-label' => 'Settings',
    'title' => 'Settings',

    'settings' => [
        [
            'key' => 'site_name',
            'label' => 'Site Name',
        ],
        [
            'key' => 'api_secret',
            'label' => 'API Secret',
            'type' => 'password',
            'panel' => 'API',
        ],
        [
            'key' => 'maintenance',
            'label' => 'Maintenance Mode',
            'type' => 'toggle',
            'help' => 'Enable maintenance mode on the frontend.',
        ],
    ],
];

Available field types

TypeDescription
textSingle-line text input (default)
textareaMulti-line text input
toggleBoolean toggle switch
selectDropdown select (requires options key)
numberNumeric input
codeCodeMirror editor (optional language key)
passwordPassword input, stored as plain text, masked on read

Setting options

KeyRequiredDescription
keyYesUnique identifier, used as the storage key
typeNoField type (default: text)
labelNoDisplay label (default: ucfirst of key)
helpNoHelp text below the field (supports HTML)
placeholderNoInput placeholder text
panelNoGroup settings into named panels
optionsNoKey-value pairs for select type
languageNoCodeMirror language mode for code type

Reading settings

use Spatie\Valuestore\Valuestore;

$store = Valuestore::make(storage_path('app/settings.json'));

$store->get('site_name');
$store->get('maintenance', false);

Events

A Concept24\NovaSettingsTool\Events\SettingsChanged event is fired every time settings are saved, with both the new and previous values.

License

MIT. Original work by Jacob Baker-Kretzmar.