Download the PHP package sewidan/laravel-setting without Composer

On this page you can find all versions of the php package sewidan/laravel-setting. 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 laravel-setting

Advanced Settings Manager for Laravel

Total Downloads Build Status

Installation

Via Composer

Publish config and migration

Setup your settings config

After publishing the setting files you will find a new configuration file: config/setting.php In this config you can define your basic settings like below.

You can also use multi level arrays

Defining optional config values

If you want to store additional data for a particular setting you can do so using an array and name one of the parameters 'default_value' which will be the default for the setting and is what gets returned by Settings::get('app_name') in this case.

Get full structure with default_value keys

By suffixing your key name with a dot or by using the Setting::getWithDefaultSubKeys('app_name') method will return all default parameters including the current value

Scoped settings

You might want to save some settings only for a certain user. You can do this using a placeholder (_*) inside your config key name.

Set save the new setting on runtime:

Now you can get the value:

The above will return null if the setting does not exist for this user. In order to return something else you can set a default as the second parameter:

Get only the changed user settings

In order to get all user settings you can use the getWithDefaultSubKeys() method or suffix the main key with a dot. The result will return a merged array with the default values from and the config while the changed values from the database will overwrite the default values.

Usage

Dealing with locale

By default language parameter are being resets every set or get calls. You could disable that and set your own long term language parameter forever using any route service provider or other method.

Custom Setting Model

The Setting model can be overwritten by creating a /config/laravel-setting.php config and adding:

Your custom model needs to extend the \JanisKelemen\Setting\EloquentStorage class.

Change log

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details.

Security

If you discover any security related issues, please send me a DM on Twitter @janiskelemen instead of using the issue tracker.

Credits

This package is mostly a fork of UniSharp/laravel-settings

License

MIT. Please see the license file for more information.


All versions of laravel-setting with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version *
adbario/php-dot-notation Version ^3.1.1
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 sewidan/laravel-setting contains the following files

Loading the files please wait ....