Download the PHP package stepanenko3/nova-settings without Composer
On this page you can find all versions of the php package stepanenko3/nova-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stepanenko3/nova-settings
More information about stepanenko3/nova-settings
Files in stepanenko3/nova-settings
Package nova-settings
Short Description This Laravel Nova settings tool based on env, using nativ nova fields and resources
License MIT
Informations about the package nova-settings
Nova Settings
Description
This Laravel Nova settings tool based on env, using nativ nova fields and resources
Features
- Using native Nova resources
- Fully responsive
- Dark mode support
- Support all packages. Like nova-tabs, activity-log, etc.
- Different settings depending on the current Env
- Separation of settings into different classes
- Customizable model and resource
Requirements
php: >=8.0
laravel/nova: ^4.0
Installation
Publish the config file:
Publish the migration file:
And run php artisan migrate
Next up, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
Create your own configuration classes in app/Nova/Settings
With Tabs
If you want to use eminiarts/nova-tabs
composer require eminiarts/nova-tabs
Delcare your settings class in config/nova-settings.php
Usage
Click on the "Settings"
menu item in your Nova app to see the tool.
Use helper function for access the settings
Get cart_link
value from General
settings in current Env
Get all General
settings
Get cart_link
value from General
settings in specific Env with default value
Configuration
All the configuration is managed from a single configuration file located in config/nova-settings.php
Extends default model
Create your own model that will extends \Stepanenko3\NovaSettings\Models\Settings
Declare your model 'model' => \App\Models\Settings::class,
in config/nova-settings.php
Extends default Nova resource
Create your own resource that will extends \Stepanenko3\NovaSettings\Resources\Settings
Declare your resource 'resource' => \App\Nova\Settings::class,
in config/nova-settings.php
Don't forget to create App\Nova\ActivityLog
Using dependsOn with out package
Use the settings->
prefix in the attribute
parameter of the dependsOn
method.
It is also necessary to get data from FormData
with settings->
prefix
Screenshots
Credits
Contributing
Thank you for considering contributing to this package! Please create a pull request with your contributions with detailed explanation of the changes you are proposing.
License
This package is open-sourced software licensed under the MIT license.