Level 11
Can't you just pull out the value from the asset_url helper and put it in front of the mix path? :)
mix(config('app.asset_url') . '/css/app.css')
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm on Laravel 5.7 and have decided to use the asset_url configuration in config/app.php. However, I also need to make use of the MIX's cache busting features for my static assets. I therefore define all the static assets as -
<link rel="stylesheet" type="text/css" href="{{mix('css/app.min.css')}}">
The problem is that mix() defaults the urls to /, totally ignoring the asset_url directive set in the config/app.php.
How do I get both?
Please or to participate in this conversation.