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 "*"
或者在您的 composer.json
文件的 require 部分添加以下内容:
"frenzelgmbh/cm-comments": "*"
配置
- 将模块添加到配置部分
'modules' => [
'comment' => [
'class' => 'net\frenzel\comment\Module'
]
]
- 运行迁移
php yii migrate --migrationPath=@net/frenzel/comment/migrations
- 在视图中使用
<?= \net\frenzel\comment\views\widgets\Comments::widget(['model'=>$model]); ?>