codicastudio / setting-manager
A random Codica Studio package.
Requires
- codicastudio/setting: ^1.0
- dev-master
- 1.0.1
- 1.0.0
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/qs-and-express-6.11.0
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/minimatch-3.1.2
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/minimist-1.2.6
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/tar-6.1.11
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/ws-6.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-4.0.1
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.8
This package is auto-updated.
Last update: 2024-11-06 19:41:23 UTC
README
Installation
Install the package in a Laravel Nova project via Composer:
composer require codicastudio/setting-manager
To publish the database migration(s) configuration of akaunting/setting
php artisan vendor:publish --tag=setting php artisan vendor:publish --tag=setting-manager 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 \codicastudio\SettingManager\SettingManagerTool ]; }
Usage
Registering fields
Define the fields in your NovaServiceProvider
's boot()
function by calling SettingManager::addSettingsFields()
.
\codicastudio\SettingManager\SettingManagerTool::addSettingsFields([ Text::make('Some setting', 'some_setting'), Number::make('A number', 'a_number') ]); // OR // Using a callable \codicastudio\SettingManager\SettingManagerTool::addSettingsFields(function() { return [ Text::make('Some setting', 'some_setting'), Number::make('A number', 'a_number'), ]; });
Configuration
reload_page_on_save
This feature is turned off per default. You may turn it on by changing reload_page_on_save
value from
false
to true
under config/setting-manager.php
to reload the entire page on save. Useful when updating any Nova UI related settings.
Credits
Thanks for the inspiration.
akaunting/setting
You can visit https://github.com/akaunting/setting to get more information on how to use getters/setters and facade of settings package.
optimistdigital/setting-manager
This package is inspired by optimistdigital/setting-manager