Download the PHP package blacksmoke26/yii2cdn without Composer
On this page you can find all versions of the php package blacksmoke26/yii2cdn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blacksmoke26/yii2cdn
More information about blacksmoke26/yii2cdn
Files in blacksmoke26/yii2cdn
Package yii2cdn
Short Description A Yii Framework 2 component for using assets in different environments (Local/CDNs)
License Apache-2.0
Homepage https://github.com/blacksmoke26/yii2cdn
Informations about the package yii2cdn
yii2cdn
A Yii Framework 2 component for using assets in different environments (Local/CDNs)
Production Ready: Used in several real projects is enough to prove its stability.
Minimum requirements: PHP 7.0+ / Yii2 Framework 2.0.12+
Bugs / Feature Request?: Create your issue here.
Resources
- Wiki: https://github.com/blacksmoke26/yii2cdn/wiki
- Class Reference: http://blacksmoke26.github.io/yii2cdn/api/
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
Info: This tutorial will demonstrate how to use FancyBox3
library in a production
(online/CDN) or development
(local/offline) environment.
I. Installing a library
- Create a
cdn
directory under the/root/web
folder. - Install or download
FancyBox3
library undercdn
directory.- Path should be
/root/web/cdn/jquery-fancybox
. - CDN URLs: https://cdnjs.com/libraries/fancybox/3.3.5
- Path should be
II. Add a component
- Open
@app/config/main.php
in your code editor. - Add a new property
cdn
undercomponents
section like the following code:
III. Registering assets
- Open any view file and paste the following line:
IV. Final moment
- Browse the action url in your browser and check the view souce.
Now it's time to play around, See ya!