liujun / laravel-rongcloud
融云 laravel-sdk
dev-master
2020-08-17 05:57 UTC
Requires
- laravel/framework: >=5.5
- rongcloud/php-sdk: ^3.0
This package is auto-updated.
Last update: 2025-04-16 15:43:50 UTC
README
laravel融云sdk 要求laravel>=5.5,基于融云官方sdk(https://github.com/rongcloud/server-sdk-php-composer)
Installing
$ composer require liujun/laravel-rongcloud -vvv
Usage
在config目录下的services.php加上如下配置
'rongcloud' => [ //融云IM配置
'app_key' => 'xxxxx',
'app_secret' => 'xxxxxx',
],
使用说明
<?php
use use Liujun\LaravelRongcloud\Facades\Rongcloud;
$user = [
'id'=> '1',
'name'=> '小叮当',//用户名称
'portrait'=> 'http://7xogjk.com1.z0.glb.clouddn.com/IuDkFprSQ1493563384017406982', //用户头像
];
$rongUser = Rongcloud::getUser()->register($user); //注册用户
dump($rongUser);
$rongUser = Rongcloud::getUser()->update($user); //更新用户
dump($rongUser);
API文档
- 官方文档(https://www.rongcloud.cn/docs/server_sdk_api/)
- example(https://github.com/rongcloud/server-sdk-php-composer/tree/master/RongCloud/example)
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT