1

When i try to run my app locally css and other static files is accessible but browser don't load them. enter image description here

<link href="{{ URL::asset('assets/css/core.css') }}" rel="stylesheet" type="text/css">
8
  • What is your browser logging in the console? Commented Jan 3, 2017 at 13:20
  • what is the output of {{ URL::asset('assets/css/core.css') }} ? Commented Jan 3, 2017 at 13:20
  • localhost:8000/assets/css/core.css Commented Jan 3, 2017 at 13:21
  • And can you open that file from the generated url? Commented Jan 3, 2017 at 13:23
  • yes i can open this file and see css code Commented Jan 3, 2017 at 13:24

2 Answers 2

1

instead of

{{ URL::asset('assets/css/core.css') }}

replace with:

 {{ url('/assets/css/core.css') }}
Sign up to request clarification or add additional context in comments.

Comments

0

Try:

<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/core.css') }}"/> 

Note I have dropped the 'URL' at the beginning of asset, I am assuming you have your URL in your .ENV and it might not be pointing to your localhost.

It's easier to just drop the URL, it wont cause you issues moving forward.

Comments

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.