PHP code example of laravel-dev-common / union-sdk-rongyun

1. Go to this page and download the library: Download laravel-dev-common/union-sdk-rongyun library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laravel-dev-common / union-sdk-rongyun example snippets



use Union\Sdk\Rongyun\RongyunEntrance;

$RongCloud = RongyunEntrance::init();

echo ("\n***************** user **************\n");
// 获取 Token 方法
$result = $RongCloud->user()->getToken('userId1', 'username', 'http://www.rongcloud.cn/images/logo.png');
echo "getToken    ";
print_r($result);
echo "\n";