thienhungho / yii2-comment-management
Yii2 评论管理
v1.0.2
2018-11-24 09:08 UTC
Requires
- thienhungho/yii2-app-core: *
- yiisoft/yii2: ~2.0.9
This package is auto-updated.
Last update: 2024-09-30 01:32:23 UTC
README
为 Yii2 定制的评论管理系统
安装
这只是一个示例,可能存在已知原因导致的代码无法工作。此源代码包括对抗丢失许可的功能。
推荐通过 composer 安装此扩展。
运行以下命令
php composer.phar require --prefer-dist thienhungho/yii2-comment-management "*"
或者添加
"thienhungho/yii2-comment-management": "*"
到你的 composer.json
文件的 require 部分。
迁移
在终端中运行以下命令进行数据库迁移
yii migrate/up --migrationPath=@vendor/thienhungho/CommentManagement/migrations
或者使用命名空间迁移(需要至少 Yii 2.0.10)
// Add namespace to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'thienhungho\CommentManagement\migrations\namespaced', ], ], ],
然后运行
yii migrate/up
配置
将模块 CommentManage 添加到你的 AppConfig
文件。
... 'modules' => [ ... /** * Comment Manage */ 'comment-manage' => [ 'class' => 'thienhungho\CommentManagement\modules\CommentManage\CommentManage', ], ... ], ...