You mean a CDN? E.G: https://www.maxcdn.com/
I'd say this should be very straigh forward for a basic use case: just use the asset server's URL in all links in the HTML that reference a static file. The only issue I see is that you can't use relative paths for the
href attributes in the HTML, but need to instead always type the fully qualified path to the other domain.
I've adapted Dayle Rees' approach to this, since it allows me to serve assets locally in development and refer to my CDN provider of choice in production.
The project can be found at: https://github.com/daylerees/website
Reference these files for usage:
Autoload: https://github.com/daylerees/website/blob/master/composer.json (See lines 12-14)
Config: https://github.com/daylerees/website/blob/master/app/config/we... (See lines 30-38)
Usage: https://github.com/daylerees/website/blob/master/src/Website/v... (See lines 13,17 and more)
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.