Comments Widget adds comment box for any view
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist spanjeta/yii2-comments "*"
or add
"spanjeta/yii2-comments": "*"
to the require section of your composer.json
file.
Once the extension is installed, use mitration to install table
yii migrate/up --migrationPath=@spanjeta/comments/migrations
simply use it in your code by :
<?= \spanjeta\comments\CommentsWidget::widget(['model'=>$model]); ?>```