2

I created a versioned css file using:

elixir(function(mix) {
    mix.sass('demo.scss')
    .version('css/demo.css');
});

the file is under public/build/demo-34f5737738.css, according to the documentation the file should be linked this way:

<link rel="stylesheet" href="{{ elixir("css/demo.css") }}"

however the stylesheet is not being applied when running in Xampp, but it's working when I start a server via command: php artisan serve. Any idea of why this is happening, or does Xampp needs a special setup before working with Laravel. Thanks!

1
  • When you inspect element, what is the URL displayed for the css stylesheet? Is it the good one? Is your URL based on a folder, like http://localhost/project/public/ ? The elixir function might apply a /css/demo.css URL and if it is the case, your browser would look in the http://localhost/css folder... Commented Mar 6, 2016 at 3:00

1 Answer 1

1

Setting absolute path via asset will solve that issue:

<link rel="stylesheet" href="{{ issue("css/demo.css") }}"
Sign up to request clarification or add additional context in comments.

1 Comment

@erick.chali glad it helped. I guess, you should set answer as correct, if you think so. That's how things work here)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.