PHP code example of larva / laravel-tencent-cloud

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

    

larva / laravel-tencent-cloud example snippets


// config/app.php

'providers' => [
    '...',
    Larva\TencentCloud\TencentCloudServiceProvider::class,
];

try {
	$cdn = TencentCloud::get('cdn');
	$cdn->RefreshObjectCaches([
		'ObjectPath' => [
			'http://www.baidu.com',
		],
		'ObjectType' => 'File'
	]);
} catch (\Exception $e) {
	print_r($e->getMessage());
}

#API网关