PHPackages                             kraenkvisuell/nova-settings - 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. kraenkvisuell/nova-settings

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

kraenkvisuell/nova-settings
===========================

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

v5.0.2(4y ago)03771MITPHPPHP ^8.0.2|^8.1

Since Aug 13Pushed 4y agoCompare

[ Source](https://github.com/kraenkvisuell/nova-settings)[ Packagist](https://packagist.org/packages/kraenkvisuell/nova-settings)[ GitHub Sponsors](https://github.com/optimistdigital)[ RSS](/packages/kraenkvisuell-nova-settings/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (5)Versions (49)Used By (1)

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

[](#nova-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1079355cba76860f36895fdc0350b6dfeea0620d9a64f94e09dbe57d29be3664/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7074696d6973746469676974616c2f6e6f76612d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-settings)[![Total Downloads](https://camo.githubusercontent.com/f585a87843998a2693614fe9c2c2c5ef1cf6ac85a2ce78343f72517e0881a264/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7074696d6973746469676974616c2f6e6f76612d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-settings)

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: >=7.2`
- `laravel/nova: ^3.0`

Features
--------

[](#features)

- Settings fields management in code
- UI for editing settings
- Helpers for accessing settings
- Rule validation support
- Supports [eminiarts/nova-tabs](https://github.com/eminiarts/nova-tabs)
- Supports [nova-translatable](https://github.com/optimistdigital/nova-translatable) w/ rule validation

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
composer require optimistdigital/nova-settings

# 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 \KraenkVisuell\NovaSettings\NovaSettings
    ];
}
```

Usage
-----

[](#usage)

### Registering fields

[](#registering-fields)

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

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

// OR

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

#### Registering field panels

[](#registering-field-panels)

```
// Using an array
\KraenkVisuell\NovaSettings\NovaSettings::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.

```
\KraenkVisuell\NovaSettings\NovaSettings::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.

```
\KraenkVisuell\NovaSettings\NovaSettings::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 `novaSettings.$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 `NovaSettings` tool like so:

```
public function tools(): array
{
    return [
        NovaSettings::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="KraenkVisuell\NovaSettings\NovaSettingsServiceProvider" --tag="config"
```

NameTypeDefaultDescription`base_path`String`nova-settings`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="KraenkVisuell\NovaSettings\NovaSettingsServiceProvider" --tag="migrations"
```

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

[](#localization)

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

```
php artisan vendor:publish --provider="KraenkVisuell\NovaSettings\NovaSettingsServiceProvider" --tag="translations"
```

You can add your translations to `resources/lang/vendor/nova-settings/` 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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80.5% 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

Every ~20 days

Recently: every ~14 days

Total

48

Last Release

1496d ago

Major Versions

1.4.0 → 2.0.02020-01-17

2.6.2 → 3.0.02020-12-02

3.5.1 → v4.0.02022-02-09

v4.0.1 → v5.0.02022-04-06

PHP version history (3 changes)1.0.0PHP &gt;=7.1.0

3.0.0PHP &gt;=7.2.0

v5.0.0PHP ^8.0.2|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbdadd3d1931366139b27d9b8a39e7edc03cb99aa82ee126e54c77ac089d4d0c?d=identicon)[manogi](/maintainers/manogi)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (240 commits)")[![allantatter](https://avatars.githubusercontent.com/u/386999?v=4)](https://github.com/allantatter "allantatter (16 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (6 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)")[![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)")[![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)")[![modernben](https://avatars.githubusercontent.com/u/67608755?v=4)](https://github.com/modernben "modernben (1 commits)")[![mxm1070](https://avatars.githubusercontent.com/u/11588575?v=4)](https://github.com/mxm1070 "mxm1070 (1 commits)")[![omarhen](https://avatars.githubusercontent.com/u/5448144?v=4)](https://github.com/omarhen "omarhen (1 commits)")[![phuclh](https://avatars.githubusercontent.com/u/6707194?v=4)](https://github.com/phuclh "phuclh (1 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![SeyamMs](https://avatars.githubusercontent.com/u/29242300?v=4)](https://github.com/SeyamMs "SeyamMs (1 commits)")[![ahmetbedir](https://avatars.githubusercontent.com/u/10426366?v=4)](https://github.com/ahmetbedir "ahmetbedir (1 commits)")[![vkazakevich](https://avatars.githubusercontent.com/u/9676524?v=4)](https://github.com/vkazakevich "vkazakevich (1 commits)")[![cidkanegou](https://avatars.githubusercontent.com/u/136440161?v=4)](https://github.com/cidkanegou "cidkanegou (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![dimitri-koenig](https://avatars.githubusercontent.com/u/4375825?v=4)](https://github.com/dimitri-koenig "dimitri-koenig (1 commits)")

---

Tags

laravelnova

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kraenkvisuell-nova-settings/health.svg)

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

###  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)[kongulov/nova-tab-translatable

Making Nova Tab Translatable

8559.5k2](/packages/kongulov-nova-tab-translatable)

PHPackages © 2026

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