Download the PHP package andreasgj/nova-settings-tool without Composer
On this page you can find all versions of the php package andreasgj/nova-settings-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-settings-tool
Laravel Nova tool to manage app settings
Store and edit simple app-wide settings right in Nova. Settings are stored as JSON using spatie/valuestore
, making them really easy to pull in and use everywhere else in your app.
Installation
Install the package via Composer in any Laravel app using Nova:
Publish the default configuration file to config/nova-settings-tool.php
:
Register the tool with Nova in the tools
method of your NovaServiceProvider
:
Usage
Settings are declared in a nova-settings-tool.php
config file. This file specifies where settings are stored, what the tool’s title is in Nova’s sidebar, the layout of the settings page, and metadata about the settings themselves.
A default config file with some helpful examples is included as a starting point:
Each item in the panels
array is a panel which contains Nova’s fields. Panels can also shown as a sidebar instead, so if you have a lot of settings, then you don't need to scroll through it all.
The settings’ actual values are stored as JSON at the location specified in the config file—storage/app/settings.json
by default.
You can use all the Nova fields which isn't a relationship field except:
- Badge - Seems like it needs a relationship to a resource.
- Boolean Group - Seems like it needs a relationship to a resource.
- Gravatar - Needs a relationship with a resource.
- ID - Needs a relationship with a resource.
All strings in this package, and any you pass to it, can easily be translated using Laravel’s built-in localization features.
Get the stored configs?
We have now added a simple way to get the configs you need. Here is the following global functions you can use:
Roadmap
The following features are planned or in development:
- ?
LICENSE