CDN how to include

Hi, I just want to ask ,how can I include this in Appasset ?

//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css

Thank you in advance.

I’m not sure you can but I don’t see what the value of doing that would be. The asset system is designed around publishing local assets and is helpful for bundling assets with a module or otherwise to program dependencies but in the case of CDN, I would just link them as usual.

Look into http://www.yiiframework.com/doc-2.0/guide-structure-assets.html and the source code for AssetManager to see whether it can resolve external URLs.

In AppAsset.php, add your library to the $js property

I got this directly from Yii2’s documentation

http://www.yiiframework.com/doc-2.0/guide-structure-assets.html