composer require twisted1919/yii2-options
./yii migrate --migrationPath=@vendor/twisted1919/yii2-options/migrations
'components' => [
[...]
'options' => [
'class' => '\twisted1919\options\Options'
],
[...]
]
Please note that options()
is added by twisted1919/yii2-shortcut-functions
automatically.
options()->set($key, $value);
options()->get($key, $defaultValue = null);
options()->remove($key);