PHP code example of puzzle9 / laravel-tencent-cloud-sdk-im

1. Go to this page and download the library: Download puzzle9/laravel-tencent-cloud-sdk-im 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/ */

    

puzzle9 / laravel-tencent-cloud-sdk-im example snippets


$app->register(Puzzle9\TencentCloudSdkIm\ServiceProvider::class);

use Puzzle9\TencentCloudSdkIm\TencentCloudSdkIm;

// 获取 user sig
TencentCloudSdkIm::GenUserSig('user_id');

// 帐号
$account = TencentCloudSdkIm::Account();
// 查询帐号
$account->check('user_id');

// ...
bash
php artisan vendor:publish --tag=laravel-tencentsdk-im
bash
cp  ./vendor/puzzle9/laravel-tencent-cloud-sdk-im/src/config.php ./config/tencentsdkim.php
json
{
    "prefer-stable": false,
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/puzzle9/qcloud-im-sdk-php",
            "canonical": false
        }
    ]
}