PHP code example of captainnx / rongcloud
1. Go to this page and download the library: Download captainnx/rongcloud 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/ */
captainnx / rongcloud example snippets
'providers' => [
// ...
Latrell\RongCloud\RongCloudServiceProvider::class,
]
'aliases' => [
// ...
'RongCloud' => Latrell\RongCloud\Facades\RongCloud::class,
]
$user_id = 1;
$name = '测试用户';
$portrait_uri = 'http://demo.com/1.jpg';
$token = RongCloud::getToken($userId, $name, $portrait_uri);
logger('RongCloud token: ' . $token);