Download the PHP package vendocrat/laravel-settings without Composer
On this page you can find all versions of the php package vendocrat/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vendocrat/laravel-settings
More information about vendocrat/laravel-settings
Files in vendocrat/laravel-settings
Package laravel-settings
Short Description Persistent, application-wide settings for Laravel 5.
License MIT
Homepage https://github.com/AlexanderPoellmann/laravel-settings
Informations about the package laravel-settings
Laravel Settings
Persistent, application-wide settings for Laravel 5.
Attention: This package is a work in progress, please use with care and be sure to report any issues!
Installation
Require the package from your composer.json file
and run $ composer update or both in one with $ composer require vendocrat/laravel-settings.
Next register the service provider and (optional) facade to your config/app.php file
Configuration
Laravel Settings includes an optional config file. Get started buy publishing it:
This will create a config/settings.php file where you can set for example which driver you want to use (JSON file, database, ...).
Migration
Note: You'll only need to complete this step when using the database driver.
If you want to store your settings in your database, you'll have to set 'driver' in your config/settings.php file to 'database' and publish the migration like so:
Afterwards you'll have to run the artisan migrate command:
Usage
Get all settings
Check if a setting exists
Get a setting
Add/update a setting
Delete a setting
Delete all settings
Save your updates (set, forget, flush)
Example
The following example would store the setting 'bar' with the key 'foo', then update it to 'bars', save it and then die & dump all current settings, which is only one unique 'foo' key-value pair.
Results in
My Edits
- restructured folders & files
- uses Eloquent models for database driver with soft deleting
- add interface contract
- removed middleware
To-Dos
- add Redis support
- add option to group settings (e.g. config/user/...)
- add logic to automatically render input forms in the frontend for settings (like a simple App Settings view or so)
License
Licensed under MIT license.
Author
Handcrafted with love by Alexander Manfred Poellmann for vendocrat in Vienna & Rome.
Based on Laravel Settings by Andreas Lutro.
All versions of laravel-settings with dependencies
doctrine/dbal Version 2.5.x
illuminate/support Version >=5.1
illuminate/database Version >=5.1
illuminate/filesystem Version >=5.1