frenzelgmbh / cm-comments
Yii2 的评论模块
0.0.4
2017-01-26 15:06 UTC
Requires
- php: >=5.4.0
- philippfrenzel/yii2-textareaautosize: *
- rmrevin/yii2-fontawesome: 2.*
- yiisoft/yii2: 2.0.*
Requires (Dev)
This package is not auto-updated.
Last update: 2024-09-22 07:57:01 UTC
README
作者:Philipp Frenzel philipp@frenzel.net
cm comments 模块允许在视图中为任意模型添加评论。这个模块仍在积极开发中,所以请勿在生产环境中使用!
安装
推荐通过 composer 安装此扩展。
运行以下命令:
php composer.phar require --prefer-dist frenzelgmbh/cm-comments "*"
或者
"frenzelgmbh/cm-comments": "*"
将以下内容添加到你的 composer.json
文件的 require 部分中。
配置
- 将模块添加到配置部分
'modules' => [
'comment' => [
'class' => 'net\frenzel\comment\Module'
]
]
- 运行迁移
php yii migrate --migrationPath=@net/frenzel/comment/migrations
- 在视图中使用
<?= \net\frenzel\comment\views\widgets\Comments::widget(['model'=>$model]); ?>