Download the PHP package primestst/nova-settings without Composer

On this page you can find all versions of the php package primestst/nova-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nova-settings

Nova Settings

Latest Version on Packagist Total Downloads

This Laravel Nova package allows you to create custom settings in code (using Nova's native fields) and creates a UI for the users where the settings can be edited.

Requirements

Features

Screenshots

Installation

Install the package in a Laravel Nova project via Composer and run migrations:

Register the tool with Nova in the tools() method of the NovaServiceProvider:

Usage

Registering fields

Define the fields in your NovaServiceProvider's boot() function by calling NovaSettings::setSettingsFields().

Registering field panels

Casts

If you want the value of the setting to be formatted before it's returned, pass an array similar to Eloquent's $casts property as the second parameter.

Subpages

Add a settings page name as a third argument to list those settings in a custom subpage.

If you leave the custom name empty, the field(s) will be listed under "General".

To translate the page name, publish the translations and add a new key novaSettings.$subpage to the respective translations file, where $subpage is the name of the page (full lowercase, slugified).

Authorization

Show/hide all settings

If you want to hide the whole Settings area from the sidebar, you can authorize the NovaSettings tool like so:

Show/hide specific setting fields

If you want to hide only some settings, you can use ->canSee(fn () => ...) per field. Like so:

Helper functions

nova_get_settings(\$keys = null)

Call nova_get_settings() to get all the settings formated as a regular array. If you pass in $keys as an array, it will return only the keys listed.

nova_get_setting(\$key, \$default = null)

To get a single setting's value, call nova_get_setting('some_setting_key'). It will return either a value or null if there's no setting with such key.

You can also pass default value as a second argument nova_get_setting('some_setting_key', 'default_value'), which will be returned, if no setting was found with given key.

nova_set_setting_value(\$key, \$value = null)

Sets a setting value for the given key.

Configuration

The config file can be published using the following command:

Name Type Default Description
base_path String nova-settings URL path of settings page.
reload_page_on_save Boolean false Reload the entire page on save. Useful when updating any Nova UI related settings.
models.settings Model Settings::class Optionally override the Settings model.

The migration can also be published and overwritten using:

Localization

The translation file(s) can be published by using the following command:

You can add your translations to resources/lang/vendor/nova-settings/ by creating a new translations file with the locale name (ie et.json) and copying the JSON from the existing en.json.

Credits

License

Nova Settings is open-sourced software licensed under the MIT license.


All versions of nova-settings with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
laravel/nova Version ^3.0
optimistdigital/nova-translations-loader Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package primestst/nova-settings contains the following files

Loading the files please wait ....