PHP code example of yiizh / yii2-cdn

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

    

yiizh / yii2-cdn example snippets


// ...
'components' => [
    'cdn' => [
        'class' => 'yiizh\cdn\CDN',
        'assets' => [
            [
                'class' => 'yii\web\JqueryAsset',
                'js' => [
                    'http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js'
                ]
            ],
            [
                'class' => 'yii\bootstrap\BootstrapAsset',
                'css' => [
                    'http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css'
                ]
            ],
        ]
    ],
]
// ...

// ...
'bootstrap' => ['log', 'cdn'],
// ...

php composer.phar