exoodev / yii2-settings
为Yii2框架的设置扩展
1.1.0
2019-09-17 10:12 UTC
Requires
- yiisoft/yii2: ~2.0.14
README
========================
安装
安装此扩展的首选方法是使用 composer。
运行以下命令之一
composer require --prefer-dist exoodev/yii2-settings
或在您的 composer.json 文件的 require 部分添加以下内容
"exoodev/yii2-settings": "*"
。
用法
示例配置
'settings' => [
'class' => 'exoo\settings\components\Settings',
],
高级模板的示例配置
'settings' => [
'class' => 'exoo\settings\components\Settings',
'cache' => [
'class' => 'yii\caching\FileCache',
'cachePath' => '@backend/runtime/cache',
]
],
迁移
yii migrate --migrationPath=@exoo/settings/migrations