Download the PHP package akaunting/laravel-setting without Composer

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

Persistent settings package for Laravel

Downloads StyleCI

This package allows you to save settings in a more persistent way. You can use the database and/or json file to save your settings. You can also override the Laravel config.

Getting Started

1. Install

Run the following command:

2. Register (for Laravel < 5.5)

Register the service provider in config/app.php

Add alias if you want to use the facade.

3. Publish

Publish config file.

4. Database

Create table for database driver

5. Configure

You can change the options of your app from config/setting.php file

Usage

You can either use the helper method like setting('foo') or the facade Setting::get('foo')

Facade

Helper

You can call the save() method to save the changes.

Auto Save

If you enable the auto_save option in the config file, settings will be saved automatically every time the application shuts down if anything has been changed.

Blade Directive

You can get the settings directly in your blade templates using the helper method or the blade directive like @setting('foo')

Override Config Values

You can easily override default config values by adding them to the override option in config/setting.php, thereby eliminating the need to modify the default config files and also allowing you to change said values during production. Ex:

The values on the left corresponds to the respective config value (Ex: config('app.name')) and the value on the right is the name of the key in your settings table/json file.

Encryption

If you like to encrypt the values for a given key, you can pass the key to the encrypted_keys option in config/setting.php and the rest is automatically handled by using Laravel's built-in encryption facilities. Ex:

JSON Storage

You can modify the path used on run-time using setting()->setPath($path).

Database Storage

If you want to use the database as settings storage then you should run the php artisan migrate. You can modify the table fields from the create_settings_table file in the migrations directory.

Extra Columns

If you want to store settings for multiple users/clients in the same database you can do so by specifying extra columns:

where user_id = x will now be added to the database query when settings are retrieved, and when new settings are saved, the user_id will be populated.

If you need more fine-tuned control over which data gets queried, you can use the setConstraint method which takes a closure with two arguments:

Custom Drivers

This package uses the Laravel Manager class under the hood, so it's easy to add your own storage driver. All you need to do is extend the abstract Driver class, implement the abstract methods and call setting()->extend.

Changelog

Please see Releases for more information what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of laravel-setting with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version >=5.3
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 akaunting/laravel-setting contains the following files

Loading the files please wait ....