Download the PHP package illuminatech/nova-config without Composer
On this page you can find all versions of the php package illuminatech/nova-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download illuminatech/nova-config
More information about illuminatech/nova-config
Files in illuminatech/nova-config
Package nova-config
Short Description A Laravel Nova tool for application configuration management.
License BSD-3-Clause
Informations about the package nova-config
A Laravel Nova tool for application configuration management
This extension provides Laravel Nova web interface for the application configuration setup.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json.
Usage
This extension provides Laravel Nova web interface for the application configuration setup. It provides a single form for the configuration parameters setup and restore defaults feature.
This extension relies on illuminatech/config package for the actual configuration management. Make sure you are familiar with illuminatech/config package before attempting to use this one.
First of all, you need to setup persistent configuration for your application, specifying the particular configuration items, which should be editable from Nova admin panel. For example:
Do not forget to register your persistent config service provider in "providers" section at "config/app.php":
Next, you should register the \Illuminatech\NovaConfig\NovaConfig
tool within Nova at your NovaServiceProvider
:
Once it is done the new tool called "Settings" will appear at the Nova sidebar menu, leading to the configuration setup form.
Field Configuration
The form field to be used for the particular configuration item management defined via \Illuminatech\Config\Item::$options
.
By default, a regular text input will be used for the item. In case \Illuminatech\Config\Item::$cast
is set to "bool" or "boolean",
the checkbox field will be used. The dropdown (e.g. select) input will be rendered in case 'options' array provided.
You can manually define the exact Nova field to be used, using 'component' key.
For example:
In general any Nova field, which allowed to be used for resource management form (e.g. create/update record form), could be
used for the particular config item. However, some fields require extra configuration parameters, which you'll have to setup
manually. In order to get a proper configuration options, you can setup the field, you are interested with, for some of your
Nova resources, then navigate to this resource's creation form and search in browser network console for the XHR request to
URL like http://example.com/nova-api/your-resource-name/creation-fields
. Its response contains JSON with key "fields",
within which you can find the proper configuration for your field.
Access Restriction
You can restrict access to the application configuration setup form using regular tool's canSee()
method provided by Nova.
For example:
Localization
All static text used within this extension is translatable via Laravel localization feature. You can publish the override for translations using following command: