twisted1919 / yii2-options
It helps to manage your app options/settings
Installs: 2 398
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 4
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4
- twisted1919/yii2-shortcut-functions: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-09 05:36:04 UTC
README
Install via composer:
composer require twisted1919/yii2-options
Run the migration:
./yii migrate --migrationPath=@vendor/twisted1919/yii2-options/migrations
Add the component in your configuration file:
'components' => [ [...] 'options' => [ 'class' => '\twisted1919\options\Options' ], [...] ]
Api:
Please note that options()
is added by twisted1919/yii2-shortcut-functions
automatically.
SET
options()->set($key, $value);
GET
options()->get($key, $defaultValue = null);
REMOVE
options()->remove($key);