PHPackages                             aka03/yii2-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aka03/yii2-comments

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

aka03/yii2-comments
===================

Yii2 Simple Comments Widget

1.0.0(6y ago)04MITPHP

Since Sep 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aka03/yii2-comments)[ Packagist](https://packagist.org/packages/aka03/yii2-comments)[ RSS](/packages/aka03-yii2-comments/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Yii2 Comments
=============

[](#yii2-comments)

Yii2 Simple Comments Widget

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist aka03/yii2-comments "*"

```

or add

```
"aka03/yii2-comments": "*"

```

to the require section of your `composer.json` file.

Migration
---------

[](#migration)

```
php yii migrate --migrationPath=@vendor/aka03/yii2-comments/src/migrations

```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```

```

If you want to use this widget in module, change `page` attribute into:

```
'page' => $this->context->module->id
```

Attributes
----------

[](#attributes)

`page` using for indicate current controller for showing comments.

`page_id` using for indicate current id. If this attribute is set each `page` will have own comments.

For example if current route = 'site/about', you can add following code:

```
