PHP code example of webravolab / cdn

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

    

webravolab / cdn example snippets


Cdn::image($source_file, array $options)

'providers' => array(
     //...
     Webravolab\Cdn\CdnServiceProvider::class,
),

'default' => 'Webravo',

'default' => 'GoogleStorage',

'providers' => [
    'Webravo' => [
        'url' => 'https://www.my-cdn.com',
        'upload_url' => 'https://www.my-cdn.com/cdn/upload',
    ],
    'GoogleStorage' => [
        'bucket' => '<bucket>',
        'ttl' => '86400'
        'url' => 'https://storage.googleapis.com',
        'cdn_bucket' => '<bucket>',
    ]],

'bypass' => true,

'overwrite' => false,

 'checksize' => true,
 
bash
php artisan vendor:publish webravolab/cdn