GithubHelp home page GithubHelp logo

rongcloud's Introduction

RongCloud

融云服务端SDK在 Laravel 5 的封装包。

该拓展包想要达到在 Laravel 5 框架下,便捷使用融云服务端SDK的目的。

安装

composer require latrell/rongcloud dev-master

更新你的依赖包 composer update 或者全新安装 composer install

使用

要使用融云服务端SDK服务提供者,你必须自己注册服务提供者到Laravel服务提供者列表中。

找到 config/app.php 配置文件中,key为 providers 的数组,在数组中添加服务提供者。

    'providers' => [
        // ...
        Latrell\RongCloud\RongCloudServiceProvider::class,
    ]

找到key为 aliases 的数组,在数组中注册Facades。

    'aliases' => [
        // ...
        'RongCloud' => Latrell\RongCloud\Facades\RongCloud::class,
    ]

运行 php artisan vendor:publish 命令,发布配置文件到你的项目中。

修改配置文件 config/latrell-rongcloud.php 中的秘钥配置。

例子

获取 Token 方法

	$user_id = 1;
	$name = '测试用户';
	$portrait_uri = 'http://demo.com/1.jpg';
	$token = RongCloud::getToken($userId, $name, $portrait_uri);
	logger('RongCloud token: ' . $token);

更多使用方法,请参考融云API文档:http://www.rongcloud.cn/docs/server.html

rongcloud's People

Contributors

latrell avatar

Watchers

James Cloos avatar

Forkers

dev-kang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.