itsurka / yii2-simple-comment
A simple comment extension.
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
This package is not auto-updated.
Last update: 2025-05-06 04:14:02 UTC
README
UNDER DEVELOPING! DO NOT USE IN PRODUCTION!
A simple comment extension.
Installation
- Download extension
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist itsurka/yii2-simple-comment "*"
or add
"itsurka/yii2-simple-comment": "*"
to the require section of your composer.json
file.
- Apply migrations from yii2-simple-comment/migrations folder.
Usage
Once the extension is installed, simply use it in your code by :
<?= SimpleComment::widget([ 'model' => $model, // AR model for which will be displayed the comments widget. 'author' => $user, // AR model - comments author. 'authorNameAttribute' => 'username', // AR models name attribute. 'authorNameAttribute' => 'avatarUrl', // Avatar URL. Use this or $authorAvatarFunction param. 'authorAvatarFunction' => 'getAvatarUrl', // To get avatar URL. Use this or $authorAvatarAttribute param. 'authorAvatarWidth' => '100', 'authorAvatarHeight' => '100', ]) ?>```