PHPackages                             omiddev32/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. [Database &amp; ORM](/categories/database)
4. /
5. omiddev32/nova-settings

ActiveLibrary[Database &amp; ORM](/categories/database)

omiddev32/nova-settings
=======================

Laravel Nova 5 settings pages with native Nova fields, validation, and authorization — like Resources, but for application configuration and per-user settings.

v1.0.1(today)10MITPHPPHP ^8.2

Since Jun 27Pushed todayCompare

[ Source](https://github.com/omiddev32/nova-settings)[ Packagist](https://packagist.org/packages/omiddev32/nova-settings)[ RSS](/packages/omiddev32-nova-settings/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

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

[](#nova-settings)

A Laravel Nova 5 tool for managing application settings backed by Eloquent models. Each settings page is a Nova tool with its own fields, validation, and authorization rules.

Why This Package?
-----------------

[](#why-this-package)

Laravel Nova ships with **Resources** for CRUD, but it does not provide a first-class way to build **settings pages** — screens where you edit configuration, profiles, or single-row application data without treating them as a full resource index.

If you needed that before, the usual workaround looked like this:

- Register a **custom Tool** with your own routes
- Build a **Blade or Vue page** from scratch inside Nova
- Write a **plain controller** for load/save logic
- Re-implement forms, validation, panels, and UI by hand

Nova field types (`Text`, `Boolean`, `Select`, `Password`, `Repeater`, and the rest) were **not** available on those custom pages. You either duplicated Nova’s UI or ended up with something that did not feel like the rest of the admin panel.

**Nova Settings** closes that gap. You define settings the same way you define a resource:

- Declare **Nova fields** in a `fields()` method
- Use **validation rules**, panels, and authorization (`canSee`, Gates)
- Get Nova’s standard form UI, loading states, and error handling
- Register as many settings pages as you need — payment gateway, admin panel, two-factor policy, user profile, and more

In short: settings pages behave like **Resources**, but for configuration and single-record forms instead of index/detail tables.

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

[](#screenshots)

### Profile

[](#profile)

Per-user settings backed by the authenticated user's model — avatar, name, email, and password.

[![Profile](examples/profile.png)](examples/profile.png)

### Payment Gateway

[](#payment-gateway)

Application-wide settings stored in a single shared row — driver, credentials, and sandbox mode.

[![Payment Gateway](examples/payment-gateway.png)](examples/payment-gateway.png)

### Two-Factor Authentication

[](#two-factor-authentication)

Boolean toggles for enabling 2FA, enforcing it globally, and choosing allowed methods.

[![Two-Factor Authentication](examples/two-factor-authentication.png)](examples/two-factor-authentication.png)

### Admin Panel

[](#admin-panel)

Global admin options such as panel name, locale, timezone, and maintenance mode.

[![Admin Panel](examples/admin-panel.png)](examples/admin-panel.png)

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

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13
- Laravel Nova 5

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

[](#installation)

```
composer require omiddev32/nova-settings
```

Publish configuration (optional):

```
php artisan vendor:publish --tag=nova-settings-config
```

Register your settings classes in `app/Providers/NovaServiceProvider.php`:

```
public function tools(): array
{
    return [
        new \App\Nova\Settings\Profile,
        new \App\Nova\Settings\PaymentGateway,
    ];
}
```

### Route caching

[](#route-caching)

This package registers its routes only when Laravel's route cache is **not** active. If your application uses `php artisan route:cache` in production, rebuild the cache after installing or updating the package so the settings routes are included:

```
php artisan route:cache
```

During local development, clear the route cache if settings pages return 404:

```
php artisan route:clear
```

How It Works
------------

[](#how-it-works)

Each settings page:

1. Extends `OmidDev32\NovaSettings\Settings`
2. Points to an Eloquent model via `$model`
3. Defines Nova fields in `fields()`
4. Appears in the Nova sidebar and is available at `/nova/settings/{uri-key}`

Data is loaded and saved through:

- `GET /nova-api/settings/{page}` — load fields
- `POST /nova-api/settings/{page}` — save fields

Settings Types
--------------

[](#settings-types)

### Application settings (shared)

[](#application-settings-shared)

Use a **single-row table** (usually `id = 1`) for settings that apply to the whole application, such as payment gateways, admin panel options, or security policies.

```
