我自己封装的 Laravel 融云 sdk,简单好用

laravel-rongcloud

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文档

Contributing

You can contribute in one of three ways:

1. File bug reports using the issue tracker.
2. Answer questions or fix bugs on the issue tracker.
3. 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

本作品采用《CC 协议》,转载必须注明作者和本文链接
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!