arubacao / asset-cdn Goto Github PK
View Code? Open in Web Editor NEWServe Laravel Assets from a Content Delivery Network (CDN)
License: MIT License
Serve Laravel Assets from a Content Delivery Network (CDN)
License: MIT License
There's something I'm not understanding, when using:
{{ style(mix_cdn('css/frontend.css')) }}
the result is <link media="all" type="text/css" rel="stylesheet" href="https://cdn.agora.community/css/frontend.css?id=e0496e6f8f90bb488b9e">
๐
How to use versionning for asset_cdn? Trying to <img src="{{ asset_cdn("test.png") }}">
the result is <img src="https://mycdn.com/test.png">
no ?id= append.
So now updating an image on S3 is not updated on the website. Trying to bust the 1 year cache configured on the object meta-data on S3.
When I run php artisan asset-cdn:sync get following error.
In FilesystemManager.php line 126: Driver [] is not supported.
I have set following code in /config/filesystems.php
'default' => env('FILESYSTEM_DRIVER', 'local'),
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('XXXXXXXX'),
'secret' => env('XXXXXXXXXXXXXXX'),
'region' => env('ap-southeast-1'),
'bucket' => env('bpn.svr.files.public'),
],
],
and in flie /config/asset-cdn.php
'use_cdn' => env('USE_CDN', true),
'cdn_url' => 'https://s3.console.aws.amazon.com/s3/buckets/bpn.svr.files.public',
'filesystem' => [
'disk' => 'asset-cdn',
'options' => [
//
],
],
'files' => [
'ignoreDotFiles' => true,
'ignoreVCS' => true,
'include' => [
'paths' => [
//
],
'files' => [
//
],
'extensions' => [
//
],
'patterns' => [
//
],
],
'exclude' => [
'paths' => [
//
],
'files' => [
//
],
'extensions' => [
//
],
'patterns' => [
//
],
],
],
Laravel 7 came out - I was wondering if there will be any support for it ?
Pushes assets that have been defined in the config to the CDN. Pushes all assets. Does not delete files on CDN.
$ php artisan asset-cdn:sync -> asset-cdn:push
Hi,
Your library works perfectly on my local dev environment but somehow mix_cdn() and asset_cdn() helper functions keep output URL to the assets in my server instead of the URL to CloudFront.
Do you have any suggestions about the problem?
Thanks for your work again.
finder search files use regexp but i need only full path. for example if i write
'include' => [
'paths' => [
'js',
'css',
]
]
finder should find files in only public/js and public/css folders but it finds files in all js and css folder in public folder. it is a bug think and i need help ...
After run php artisan asset-cdn:sync nothing happen.
I have all ready push all css, js files on CDN. Now I added some new files in my local stystem. To deploy new added files on CDN I run php artisan asset-cdn:sync but nothing happen.
when i run artisan asset-cdn:push All files deploy again which is more time consuming and no need to already deployed file again.
Please can you help me why php artisan asset-cdn:sync not working??
Hi,
your library is really great! But I have small problem.
For example I have bucket: s_web
where I have two folders:
and my question is: is it possible to define namespace for example assets
where command php artisan asset-cdn:sync
push data to bucket s_web
and directory assets
?
Really plugin is very awesome.
I need small help from you.
Can we do that so when I run site from my local system it loads all css, js and fonts from my local so when internet is not working then I can also work easily. And when I run live site all things load from CDN.
Is there any settting for that?
Thank you for your great help and support.
I would like to use the Package Digitalcoean Spaces and i dont want to pay foreach enviroment.
Is it possible to prefix them like /production/css/app.css
?
Thanks a lot!
Can I use this package to sync assets in a cloudflare cdn?
Laravel 6.0 just came out but we're having some issues upgrading because of asset-cdn.
Composer.json:
"laravel/framework": "^6.0"
Composer update output:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove arubacao/asset-cdn 0.2.1
- Conclusion: don't install laravel/framework v6.0.0
- Installation request for arubacao/asset-cdn ^0.2.1 -> satisfiable by arubacao/asset-cdn[0.2.1].
- Conclusion: don't install laravel/framework 6.x-dev
- arubacao/asset-cdn 0.2.1 requires laravel/framework ~5.4 -> satisfiable by laravel/framework[5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[6.0.x-dev, 5.4.x-dev].
- Can only install one of: laravel/framework[6.0.x-dev, 5.5.x-dev].
- Can only install one of: laravel/framework[6.0.x-dev, 5.6.x-dev].
- Can only install one of: laravel/framework[6.0.x-dev, 5.7.x-dev].
- Can only install one of: laravel/framework[6.0.x-dev, 5.8.x-dev].
- Installation request for laravel/framework ^6.0 -> satisfiable by laravel/framework[6.0.x-dev, 6.x-dev, v6.0.0].
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.