by
265 8
1
5
565
0
Top 5% !
Popular
Tagged
Specified
OpenSource
Created
Modified Nov 21, 2017

Published on:

Languagecsharp
Languagephp
LicenseMIT_X11

CDN integration in Yii2 App

How to integrate CloudwaysCDN with Yii2 applications: https://www.cloudways.com/blog/cdn-in-yii2/
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/3065850/CDN-integration-in-Yii2-App?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
// ... 'components' => [    // ... 'cdn' => [             'class' => '\yii2cdn\Cdn',             'baseUrl' => defined ('YII2CDN_OFFLINE')                 ? 'http://localhost/yii2/cdn'                 : '//71265-358070-raikfcquaxqncofqfm.stackpathdns.com/cdn',             'basePath' => dirname(__DIR__, 2) . '/cdn',             'components' => [                 'font-awesome' => [                     'css' => [                         [                             // local version                             'font-awesome.min.css',                             // cdn version                             '@cdn' => '//71265-358070-raikfcquaxqncofqfm.stackpathdns.com/cdn/font-awesome/css/font-awesome.min.css',                         ]                     ]                 ]             ],         ],  // ... ], // ...
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus