My environment route is http://localhost/example.com/www/public/ and my code
<link rel="stylesheet" href="{{ elixir("css/app.min.css") }}">
But elixir function returns
<link rel="stylesheet" href="/build/css/app.min-ea7ebc07.css">
instead of absolute path
<link rel="stylesheet" href="http://localhost/example.com/www/public/build/css/app.min-ea7ebc07.css">
The documentation says something like
<link rel="stylesheet" href="{{ elixir("css/all.css") }}">
It's a but or I need to use some extrange hack like
<link rel="stylesheet" href="{{ url(elixir("css/app.min.css")) }}">
Best regards.
You need to set app.url in your config correctly.
Why asset() and url() work from one way (absolute full path with host) and elixir() works as different way (relative to basepath)? Thanks :)
@eusonlito just use it like that if you need to push absolute pathes:
<link href="{{ asset(elixir('css/all.css')) }}" rel="stylesheet" type="text/css">
<script src="{{ asset(elixir('js/all.js')) }}" type="text/javascript"></script>
@GrahamCampbell the app.url is correct.
The problem is when you have VH with wamp and the base path "/" go to you www folder.
Most helpful comment
@eusonlito just use it like that if you need to push absolute pathes: