In my Laravel site, I am serving my assets via CDN at https://cdn.example.com/asset.js. If I know the asset name, how can I generate a URL to the asset?
So far I have managed to generate https://example.com/asset.js by doing asset(Storage::url('asset.js'));
, but I can't figure out how to add the subdomain, either by calling different methods or editing config.
Any ideas?
Cheers.