Easily load your assets from a CDN when on production.
amrsoliman/assets-cdn is a Laravel package for easily load your assets from a cdn when on production..
It currently has 3 GitHub stars and 1.122 downloads on Packagist (latest version v1.1).
Install it with composer require amrsoliman/assets-cdn.
Discover more Laravel packages by amrsoliman
or browse all Laravel packages to compare alternatives.
Last updated
Easily display your Laravel assets through a cdn without having to change a line in your views.
Add the following require to your composer.json file:
"require": {
...
"amrsoliman/assets-cdn": "1.*"
},
...
"post-install-cmd": [
...
"php artisan assets-cdn:update"
],
Then run composer update
Add "AmrSoliman\AssetsCdn\AssetsCdnServiceProvider", to the list of providers in config/app.php.
Run php artisan vendor:publish
Go to file config/assets-cdn.php and configure your CDN. We recommend only enabling it in production.
Any CDN works provided that the following conditions are met: