yiicod/yii2-systemparams
Composer 安装命令:
composer require yiicod/yii2-systemparams
包简介
Config params with editable in the admin panel for the Yii framework
README 文档
README
With this extension you easy config your Yii::$app->params from admin panel. You need install extension with composer and run command:
php yii params sync
This is command for synchronize your php config with db.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiicod/systemparam "*"
or add
"yiicod/systemparam": "*"
to your composer.json
Config:
'components' => array( ... 'systemparams => [ 'commandMap' => [ 'params' => [ 'class' => SystemParamCommand::class, 'paramsAlias' => '@app/../common/config/params-system.php', ], ], 'modelMap' => [ 'systemParam' => [ 'class' => SystemParamModel::class, ], 'systemParamSearch' => [ 'class' => SystemParamSearch::class, ], ], 'cacheDuration' => 28800, 'components' => [], ] ... ) 'bootstrap' => array('systemparams')
Usage
Use (or extend) yiicod\systemparams\controllers, or add to your controller crud actions:
public function actions() { return [ 'admin' => [ 'class' => yiicod\systemparam\actions\admin\Admin::class, ], 'update' => [ 'class' => yiicod\systemparam\actions\admin\Update::class, ], ]; }
Migration usage
Migration command or use manual(http://www.yiiframework.com/doc-2.0/guide-db-migrations.html) for configuration:
yii migrate --migrationPath=@vendor/yiicod/yii2-systemparam/migrations
统计信息
- 总下载量: 959
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-18