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

ActiveLibrary

dkvhin/nova-settings
====================

A Laravel Nova tool for editing custom settings using native Nova fields. This is a forked from optimistdigital/nova-settings

4.0.0(5y ago)122MITPHPPHP &gt;=7.2.0

Since Aug 13Pushed 5y agoCompare

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

READMEChangelogDependencies (7)Versions (33)Used By (0)

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

[](#nova-settings)

NOTE! THis is a forked from

I've modified this to be a per User settings approached instead of a global 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 dkvhin/nova-settings

# Publish Config
php artisan vendor:publish --provider="OptimistDigital\NovaSettings\NovaSettingsServiceProvider" --tag="config"

# Publish Migrations
php artisan vendor:publish --provider="OptimistDigital\NovaSettings\NovaSettingsServiceProvider" --tag="migrations"

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

Usage
-----

[](#usage)

### Registering fields

[](#registering-fields)

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

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

// OR

// Using a callable
\OptimistDigital\NovaSettings\NovaSettings::addSettingsFields(function() {
  return [
    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.

```
\OptimistDigital\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.

```
\OptimistDigital\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)

[](#nova_get_settingskeys--null)

Call `nova_get_settings()` to get all the settings formated as a regular array. If you pass in `$keys` as an array, it will return only the keys listed.

#### 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.

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

[](#configuration)

The config file can be published using the following command:

```
php artisan vendor:publish --provider="OptimistDigital\NovaSettings\NovaSettingsServiceProvider" --tag="config"
```

NameTypeDefaultDescription`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="OptimistDigital\NovaSettings\NovaSettingsServiceProvider" --tag="migrations"
```

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

[](#localization)

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

```
php artisan vendor:publish --provider="OptimistDigital\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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 89.6% 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 ~15 days

Recently: every ~4 days

Total

32

Last Release

1986d ago

Major Versions

1.4.0 → 2.0.02020-01-17

2.6.2 → 3.0.02020-12-02

3.1.0 → 4.0.02020-12-07

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

3.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ecdf60c6531a6093808b3ac4d44b551814688498fd9586ed6c8d9e73972122c?d=identicon)[dkvhin](/maintainers/dkvhin)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (163 commits)")[![dkvhin](https://avatars.githubusercontent.com/u/7764035?v=4)](https://github.com/dkvhin "dkvhin (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)")[![alexrififi](https://avatars.githubusercontent.com/u/21067613?v=4)](https://github.com/alexrififi "alexrififi (2 commits)")[![liorocks](https://avatars.githubusercontent.com/u/534610?v=4)](https://github.com/liorocks "liorocks (2 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (1 commits)")[![mxm1070](https://avatars.githubusercontent.com/u/11588575?v=4)](https://github.com/mxm1070 "mxm1070 (1 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![allantatter](https://avatars.githubusercontent.com/u/386999?v=4)](https://github.com/allantatter "allantatter (1 commits)")[![vkazakevich](https://avatars.githubusercontent.com/u/9676524?v=4)](https://github.com/vkazakevich "vkazakevich (1 commits)")

---

Tags

laravelnova

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[laravel/nova-log-viewer

A Laravel Nova tool for viewing your application logs.

136301.3k1](/packages/laravel-nova-log-viewer)[stepanenko3/nova-command-runner

Laravel Nova tool for running Artisan and bash(shell) commands.

36983.0k](/packages/stepanenko3-nova-command-runner)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[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)
