Skip to content

live-controls/easy-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Settings

Simple settings library for easily accessable configurations

Setup

  1. Publish migrations
php artisan vendor:publish livecontrols.easy_settings.migrations
  1. Migrate
php artisan migrate

Usage

Set settings

This will set a specific value (can be any json compatible value) to a specific key. This will also update a value if it already exists.

\LiveControls\EasySettings\EasySettings::set('key', 'value');

Get settings

This will get a specific value and stores it to the cache if set.

\LiveControls\EasySettings\EasySettings::get('key', 'default', 120); //Will return a string 'default' if value can't be found and stores it for 120 seconds

Forget settings

This will remove the setting with the specific key from the cache.

\LiveControls\EasySettings\EasySettings::forget('key');

Delete settings

This will delete the setting with the specific key from the database and cache.

\LiveControls\EasySettings\EasySettings::delete('key');

About

Simple settings library for easily accessable configurations

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages