PHP code example of quangtrung38 / trendzycloud

1. Go to this page and download the library: Download quangtrung38/trendzycloud 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/ */

    

quangtrung38 / trendzycloud example snippets


use quangtrung38\trendzycloud\TrendzyCloud;

// upload

$data = [
    'file'   => $file, // input file
    'userId' => 1,
];

$trendzyCloud = new TrendzyCloud();
$result = $cloud->uploadFile($data);

$result = $cloud->uploadVideo($data);

$result = $cloud->uploadDocument($data);


// delete

$data = [
    'key'   => '5f6c4919e67b5',
    'userId' => \Auth::id(),
];

$cloud = new TrendzyCloud;
$result = $cloud->deleteImage($data);

$result = $cloud->deleteVideo($data);

$result = $cloud->deleteDocument($data);