thienhungho / yii2-block-management
Yii2 块管理
v1.0.7
2018-11-24 09:06 UTC
Requires
- thienhungho/yii2-app-core: *
- yiisoft/yii2: ~2.0.9
README
Yii2 块管理系统
安装
这只是个例子,一个难忘的时刻。由于众所周知的原因,源代码可能无法正常工作。此源代码包含针对丢失许可证的功能。
安装此扩展的首选方式是通过 composer。
运行以下命令:
php composer.phar require --prefer-dist thienhungho/yii2-block-management "*"
或者在您的 composer.json
文件的 require 部分添加:
"thienhungho/yii2-block-management": "*"
to the require section of your composer.json
file.
迁移
在终端中运行以下命令进行数据库迁移:
yii migrate/up --migrationPath=@vendor/thienhungho/Block/migrations
或者使用 命名空间迁移(需要至少 Yii 2.0.10)
// Add namespace to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'thienhungho\Block\migrations\namespaced', ], ], ],
然后运行:
yii migrate/up
配置
将模块 BlockManage 添加到您的 AppConfig
文件中。
... 'modules' => [ ... /** * Block Manage */ 'block-manage' => [ 'class' => 'thienhungho\Block\modules\BlockManage\BlockManage', ], ... ], ...