PHPackages                             codehero-mx/nova-settings-tool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codehero-mx/nova-settings-tool

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codehero-mx/nova-settings-tool
==============================

A Laravel Nova tool for editing custom settings using native Nova fields.

v1.0.0(2y ago)0487MITPHPPHP &gt;=8.0

Since Feb 2Pushed 2y agoCompare

[ Source](https://github.com/codehero-mx/nova-settings-tool)[ Packagist](https://packagist.org/packages/codehero-mx/nova-settings-tool)[ GitHub Sponsors](https://github.com/outl1ne)[ RSS](/packages/codehero-mx-nova-settings-tool/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Nova Settings
=============

[](#nova-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/de3061b52994a4cb4eb6b5c2c573b99f0cf1275de5eabbc0e962a3ca3c8f1969/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f75746c316e652f6e6f76612d73657474696e67732d746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-settings-tool)[![Total Downloads](https://camo.githubusercontent.com/829bd743ea258078bb78a234a3b5dc76e8c7b09379a8c250bcc07f6d3ab115e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f75746c316e652f6e6f76612d73657474696e67732d746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-settings-tool)

This [Laravel Nova](https://nova.laravel.com) package allows you to create custom settings in code (using Nova's native fields) and creates a UI for the users where the settings can be edited.

Requirements
------------

[](#requirements)

- `php: >=8.0`
- `laravel/nova: ^4.26`

Features
--------

[](#features)

- Settings fields management in code
- UI for editing settings
- Helpers for accessing settings
- Rule validation support

Screenshots
-----------

[](#screenshots)

[![Settings View](docs/index.png)](docs/index.png)

Installation
------------

[](#installation)

Install the package in a Laravel Nova project via Composer and run migrations:

```
# Install nova-settings-tool
composer require outl1ne/nova-settings-tool

# Run migrations
php artisan migrate
```

Register the tool with Nova in the `tools()` method of the `NovaServiceProvider`:

```
// in app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        // ...
        new \CodeHeroMX\SettingsTool\SettingsTool
    ];
}
```

Usage
-----

[](#usage)

### Registering fields

[](#registering-fields)

Define the fields in your `NovaServiceProvider`'s `boot()` function by calling `SettingsTool::addSettingsFields()`.

```
// Using an array
\CodeHeroMX\SettingsTool\SettingsTool::addSettingsFields([
    Text::make('Some setting', 'some_setting'),
    Number::make('A number', 'a_number'),
]);

// OR

// Using a callable
\CodeHeroMX\SettingsTool\SettingsTool::addSettingsFields(function() {
  return [
    Text::make('Some setting', 'some_setting'),
    Number::make('A number', 'a_number'),
  ];
});
```

#### Registering field panels

[](#registering-field-panels)

```
// Using an array
\CodeHeroMX\SettingsTool\SettingsTool::addSettingsFields([
    Panel::make('Panel Title', [
      Text::make('Some setting', 'some_setting'),
      Number::make('A number', 'a_number'),
    ]),
]);
```

### Casts

[](#casts)

If you want the value of the setting to be formatted before it's returned, pass an array similar to `Eloquent`'s `$casts` property as the second parameter.

```
\CodeHeroMX\SettingsTool\SettingsTool::addSettingsFields([
    // ... fields
], [
  'some_boolean_value' => 'boolean',
  'some_float' => 'float',
  'some_collection' => 'collection',
  // ...
]);
```

### Subpages

[](#subpages)

Add a settings page name as a third argument to list those settings in a custom subpage.

```
\CodeHeroMX\SettingsTool\SettingsTool::addSettingsFields([
    Text::make('Some setting', 'some_setting'),
    Number::make('A number', 'a_number'),
], [], 'Subpage');
```

If you leave the custom name empty, the field(s) will be listed under "General".

To translate the page name, publish the translations and add a new key `settingsTool.$subpage` to the respective translations file, where `$subpage` is the name of the page (full lowercase, slugified).

### Authorization

[](#authorization)

#### Show/hide all settings

[](#showhide-all-settings)

If you want to hide the whole `Settings` area from the sidebar, you can authorize the `SettingsTool` tool like so:

```
public function tools(): array
{
    return [
        SettingsTool::make()->canSee(fn () => user()->isAdmin()),
    ];
}
```

#### Show/hide specific setting fields

[](#showhide-specific-setting-fields)

If you want to hide only some settings, you can use `->canSee(fn () => ...)` per field. Like so:

```
Text::make('A text field')
  ->canSee(fn () => user()->isAdmin()),
```

### Helper functions

[](#helper-functions)

#### nova\_get\_settings($keys = null, $defaults = \[\])

[](#nova_get_settingskeys--null-defaults--)

Call `nova_get_settings()` to get all the settings formated as a regular array. Additionally, you can pass a `key => value` array as a second argument: `nova_get_settings(['some_key], ['some_key' => 'default_value'])`.

#### nova\_get\_setting($key, $default = null)

[](#nova_get_settingkey-default--null)

To get a single setting's value, call `nova_get_setting('some_setting_key')`. It will return either a value or null if there's no setting with such key.

You can also pass default value as a second argument `nova_get_setting('some_setting_key', 'default_value')`, which will be returned, if no setting was found with given key.

#### nova\_set\_setting\_value($key, $value = null)

[](#nova_set_setting_valuekey-value--null)

Sets a setting value for the given key.

Configuration
-------------

[](#configuration)

The config file can be published using the following command:

```
php artisan vendor:publish --provider="CodeHeroMX\SettingsTool\SettingsToolServiceProvider" --tag="config"
```

NameTypeDefaultDescription`base_path`String`nova-settings-tool`URL path of settings page.`reload_page_on_save`BooleanfalseReload the entire page on save. Useful when updating any Nova UI related settings.`models.settings`Model`Settings::class`Optionally override the Settings model.The migration can also be published and overwritten using:

```
php artisan vendor:publish --provider="CodeHeroMX\SettingsTool\SettingsToolServiceProvider" --tag="migrations"
```

Localization
------------

[](#localization)

The translation file(s) can be published by using the following command:

```
php artisan vendor:publish --provider="CodeHeroMX\SettingsTool\SettingsToolServiceProvider" --tag="translations"
```

You can add your translations to `resources/lang/vendor/nova-settings-tool/` by creating a new translations file with the locale name (ie `et.json`) and copying the JSON from the existing `en.json`.

Credits
-------

[](#credits)

- [Tarvo Reinpalu](https://github.com/Tarpsvo)

License
-------

[](#license)

Nova Settings is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

837d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35c1c6e446fbc2a96e779a2a073bc1127fe1410e833c7e52611f3450a7bec58b?d=identicon)[iBet7o](/maintainers/iBet7o)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (319 commits)")[![allantatter](https://avatars.githubusercontent.com/u/386999?v=4)](https://github.com/allantatter "allantatter (16 commits)")[![marttinnotta](https://avatars.githubusercontent.com/u/7058209?v=4)](https://github.com/marttinnotta "marttinnotta (11 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (6 commits)")[![alexrififi](https://avatars.githubusercontent.com/u/21067613?v=4)](https://github.com/alexrififi "alexrififi (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (3 commits)")[![MarikaMustV](https://avatars.githubusercontent.com/u/31190256?v=4)](https://github.com/MarikaMustV "MarikaMustV (3 commits)")[![puzzledmonkey](https://avatars.githubusercontent.com/u/3913622?v=4)](https://github.com/puzzledmonkey "puzzledmonkey (2 commits)")[![dimitri-koenig](https://avatars.githubusercontent.com/u/4375825?v=4)](https://github.com/dimitri-koenig "dimitri-koenig (2 commits)")[![AndreasFurster](https://avatars.githubusercontent.com/u/7996369?v=4)](https://github.com/AndreasFurster "AndreasFurster (2 commits)")[![Gertiozuni](https://avatars.githubusercontent.com/u/26062255?v=4)](https://github.com/Gertiozuni "Gertiozuni (2 commits)")[![liorocks](https://avatars.githubusercontent.com/u/534610?v=4)](https://github.com/liorocks "liorocks (2 commits)")[![JoshMoreno](https://avatars.githubusercontent.com/u/22627952?v=4)](https://github.com/JoshMoreno "JoshMoreno (2 commits)")[![SeyamMs](https://avatars.githubusercontent.com/u/29242300?v=4)](https://github.com/SeyamMs "SeyamMs (1 commits)")[![shaffe-fr](https://avatars.githubusercontent.com/u/3834222?v=4)](https://github.com/shaffe-fr "shaffe-fr (1 commits)")[![Katzen48](https://avatars.githubusercontent.com/u/19516002?v=4)](https://github.com/Katzen48 "Katzen48 (1 commits)")[![chrillep](https://avatars.githubusercontent.com/u/1267931?v=4)](https://github.com/chrillep "chrillep (1 commits)")[![cidkanegou](https://avatars.githubusercontent.com/u/136440161?v=4)](https://github.com/cidkanegou "cidkanegou (1 commits)")[![eugenefvdm](https://avatars.githubusercontent.com/u/1836436?v=4)](https://github.com/eugenefvdm "eugenefvdm (1 commits)")

---

Tags

laravelnova

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codehero-mx-nova-settings-tool/health.svg)

```
[![Health](https://phpackages.com/badges/codehero-mx-nova-settings-tool/health.svg)](https://phpackages.com/packages/codehero-mx-nova-settings-tool)
```

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2872.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2861.8M9](/packages/outl1ne-nova-sortable)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

14720.0k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
