Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.06 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.06 KB

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
        ];
    }
]);