live-controls / easy-settings
There is no license information available for the latest version (v1.1.0) of this package.
Simple settings library for easily accessable configurations
v1.1.0
2026-03-01 03:28 UTC
Requires (Dev)
- larastan/larastan: ^3.0
- orchestra/testbench: ^9
README
Simple settings library for easily accessable configurations
Setup
- Publish migrations
php artisan vendor:publish livecontrols.easy_settings.migrations
- 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');