thienhungho / yii2-post-management
Yii2 文章管理
v1.1.0
2019-05-15 12:42 UTC
Requires
- thienhungho/yii2-app-core: *
- yiisoft/yii2: ~2.0.9
README
Yii2 文章管理系统
安装
这只是一个示例,可能存在已知原因导致源代码无法工作。此源代码包括对抗丢失许可证的功能。
安装此扩展的首选方式是通过 composer。
运行以下命令或添加以下内容到您的 composer.json
文件的 require 部分。
php composer.phar require --prefer-dist thienhungho/yii2-post-management "*"
运行
"thienhungho/yii2-post-management": "*"
到您的 composer.json
文件。
迁移
在终端中运行以下命令进行数据库迁移
yii migrate/up --migrationPath=@vendor/thienhungho/PostManagement/migrations
或使用 命名空间迁移(需要至少 Yii 2.0.10)
// Add namespace to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'thienhungho\PostManagement\migrations\namespaced', ], ], ],
然后运行
yii migrate/up
配置
将模块 PostManage 添加到您的 AppConfig
文件。
... 'modules' => [ ... /** * Post Manage */ 'post-manage' => [ 'class' => 'thienhungho\PostManagement\modules\PostManage\PostManage', ], /** * Post Frontend */ 'post' => [ 'class' => 'thienhungho\PostManagement\modules\PostFrontend\PostModule', ], ... ], ...
模块
PostBase, PostManage, PostFrontend