承接 sintret-2017/yii2-chat-adminlte 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sintret-2017/yii2-chat-adminlte

Composer 安装命令:

composer require sintret-2017/yii2-chat-adminlte

包简介

Yii2 extension for Chat plugin with admin lte

README 文档

README

yii2 chat widget widget admin lte

Fix bug yii2-chat-adminlte Trying to get property of non-object $model->user->username

delete avatar

add via composer :

"sintret/yii2-chat-adminlte": "dev-master"

You just add table chat to your database with this :

CREATE TABLE `chat` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `userId` INT(11) DEFAULT NULL,
  `message` TEXT,
  `updateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=INNODB;

and calling the widget in the view :

                                        
         \yii\helpers\Url::to(['/chat/send-chat']),
            'userModel'=>  \app\models\User::className(),
            'userField' => 'avatarImage'
                ]); ?>
    

in your controller eg ChatController action sendChat

public function actionSendChat() {
    if (!empty($_POST)) {
        echo \sintret\chat\ChatRoom::sendChat($_POST);
    }
}

attribute additional for this widget:

url : your controller/action to post message using ajax

userModel : your user model class name

userField : your avatar image source in your User class, ex: avatarImage

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 29
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固