Skip to content

dynamikaweb/yii2-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamikaweb/yii2-chat

Latest Stable Version Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require dynamikaweb/yii2-chat "*"

or add

"dynamikaweb/yii2-chat": "*"

to the require section of your composer.json file.

How to Use

use dynamikaweb\chat\Chat;

echo ChatView::widget([
    'dataProvider' => $dataProvider,
    'receive' => function ($model, $key, $index) {
        return [
            'right' => $index % 2,
            'title' => $model->title,
            'message' => $model->message
        ];
    }
]);