dev-master
9999999-devUniversal comment for yii2 framework
BSD-3-Clause
The Requires
by Damir Muratov
extension yii2 yii comment
Universal comment for yii2 framework
That library include Comment
model and CommentBehaviour
.
It is simple and fast way to provide easy adding comments for others models., (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
composer require dmuratov/yii2-universal-comment:~1.0
or add, (*4)
"dmuratov/yii2-universal-comment" : "~1.0"
to the require section of your application's composer.json
file., (*5)
Adding behaviour for model:, (*6)
public function behaviors() { return [ ... 'comment' => [ 'class' => \dmuratov\comment\CommentBehaviour::className() ] ]; }
Adding comment for model, (*7)
$model->addComment('Comment text');
Getting comments, (*8)
$model->getComments()->all();
Universal comment for yii2 framework
BSD-3-Clause
extension yii2 yii comment