frenzelgmbh/cm-comments

Yii2 的评论模块

安装次数: 359

依赖: 0

建议: 0

安全: 0

星标: 1

关注者: 5

分支: 1

类型:yii2-extension

0.0.4 2017-01-26 15:06 UTC

This package is not auto-updated.

Last update: 2024-09-22 07:57:01 UTC


README

作者:Philipp Frenzel philipp@frenzel.net

cm comments 模块允许在视图中为任意模型添加评论。这个模块仍在积极开发中,所以请勿在生产环境中使用!

Latest Stable Version Build Status Code Climate Version Eye License

安装

推荐通过 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]); ?>