poprigun / chat
poprigun-chat
Installs: 324
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 2
Open Issues: 1
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-10-26 01:47:05 UTC
README
poprigun-chat
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require poprigun/chat "*"
or add
"poprigun/chat": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
php
js
$(window).ready(function(){ poprigunChat.loadDialogs(); poprigunChat.listenServerDialog(); });
Template
Templates build with Handlebars
Migration
yii migrate --migrationPath=@vendor/poprigun/chat/migrations
Main config
'modules' => [ 'poprigun_chat' => [ 'class' => \poprigun\chat\PChatModule::className(), 'params' => [ 'pchat-settings' => [ 'userModel' => \frontend\models\User::className(), 'userAvatarMethod' => [ 'class' =>\frontend\models\User::className(), 'method' =>'avatar', ], 'userNameMethod' => [ 'class' =>\frontend\models\Profile::className(), 'method' =>'fullName', 'relation' => 'profile', ], ], ], ], ],