https://github.com/xutl/yii2-tim
适用于Yii2的腾讯云通信
https://github.com/xutl/yii2-tim
chat im yii2 yii2-extension yii2-widgets
Last synced: 2 months ago
JSON representation
适用于Yii2的腾讯云通信
- Host: GitHub
- URL: https://github.com/xutl/yii2-tim
- Owner: xutl
- Created: 2017-07-07T02:34:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-13T09:19:26.000Z (almost 7 years ago)
- Last Synced: 2025-01-28T22:49:48.271Z (4 months ago)
- Topics: chat, im, yii2, yii2-extension, yii2-widgets
- Language: PHP
- Homepage: https://www.qcloud.com/product/im
- Size: 358 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii2-tim
适用于Yii2的腾讯云通信## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```bash
$ composer require xutl/yii2-tim:~3.0
```or add
```
"xutl/yii2-tim": "~3.0"
```to the `require` section of your `composer.json` file.
配置
----To use this extension, you have to configure the Connection class in your application configuration:
```php
return [
//....
'components' => [
'im' => [
'class' => 'xutl\tim\Tim',
'appId' => '123456',
'accountType' => '123456',
'administrator' => 'webmaster',
'privateKey' => '私钥字符串一行',
'publicKey' => '公钥字符串一行',
],
]
];
```使用
----```php
/** var Tim $im */
$im = Yii::$app->im->getAccount('test');
$res = $im->kick();
print_r($res);
```