chenjiacheng / hyperf-tim
腾讯云 即时通信 IM SDK for Hyperf
v1.0.0
2022-08-27 15:31 UTC
Requires
- php: >=8.0.2
- chenjiacheng/tim: ^1.0
- hyperf/guzzle: ^2.2|^3.0
This package is auto-updated.
Last update: 2025-03-27 21:53:42 UTC
README
腾讯云 即时通信 IM SDK for Hyperf
运行环境
- PHP >= 8.0.2
- Composer >= 2.0
- Hyperf >= 2.2
安装方式
composer require chenjiacheng/hyperf-tim
Hyperf
发布组件配置文件
php bin/hyperf.php vendor:publish chenjiacheng/hyperf-tim
使用示例
<?php declare(strict_types=1); namespace App\Controller; use Chenjiacheng\HyperfTim\Tim; class TimController extends AbstractController { public function testImport(Tim $tim) { // 第一种方式 $result1 = $tim->account->import('101'); var_dump($result1); // 第二种方式 $result2 = make(Tim::class)->account->import('102'); var_dump($result2); // 第三种方式 $result3 = make(\Chenjiacheng\Tim\Tim::class)->account->import('103'); var_dump($result3); return []; } }
更多示例请查看 https://github.com/chenjiacheng/tim
License
MIT