PHP code example of thotam / thotam-file-library

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

    

thotam / thotam-file-library example snippets


        'google' => [
            'driver' => 'google',
            'clientId' => env('MAIN_GOOGLE_DRIVE_CLIENT_ID'),
            'clientSecret' => env('MAIN_GOOGLE_DRIVE_CLIENT_SECRET'),
            'refreshToken' => env('MAIN_GOOGLE_DRIVE_REFRESH_TOKEN'),
            'folderId' => env('MAIN_GOOGLE_DRIVE_FOLDER_ID'),
        ],

MAIN_GOOGLE_DRIVE_CLIENT_ID=""
MAIN_GOOGLE_DRIVE_CLIENT_SECRET=""
MAIN_GOOGLE_DRIVE_REFRESH_TOKEN=""
MAIN_GOOGLE_DRIVE_FOLDER_ID=""

MAIN_GOOGLE_API_KEY=""

VIMEO_CLIENT=
VIMEO_SECRET=
VIMEO_ACCESS=

VIMEO_ALT_CLIENT=
VIMEO_ALT_SECRET=
VIMEO_ALT_ACCESS=

add Thotam\ThotamFileLibrary\Providers\ThotamGoogleDriveServiceProvider::class to 'providers' in config/app.php

use Thotam\ThotamFileLibrary\Traits\FileLibraryTraits;

use Thotam\ThotamFileLibrary\Traits\ThotamFileUploadTraits;

$schedule->command('thotam-file-library:clean-public-disk')->everyTenMinutes();