Support the ongoing development of Laravel.io →
Configuration Architecture
Last updated 2 years ago.
0

You mean a CDN? E.G: https://www.maxcdn.com/

Last updated 2 years ago.
0

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 src and href attributes in the HTML, but need to instead always type the fully qualified path to the other domain.

Last updated 2 years ago.
0

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/website.php (See lines 30-38)

Helper: https://github.com/daylerees/website/blob/master/src/Website/Helper/cdn.php

Usage: https://github.com/daylerees/website/blob/master/src/Website/views/base.blade.php (See lines 13,17 and more)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Saradimi saradimi Joined 17 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.