0

I am new to Laravel. I want to add a CSS file in my Laravel project for my template. ın my project directory, I added a folder assets, and inside is assets/css/style.css

Now I am trying to apply it using {{asset('assets/css/style.css')}} but when I try to access http://localhost:8000/assets/css/style.css

I got an error of:

Sorry, the page you are looking for could not be found. 1/1 NotFoundHttpException in compiled.php line 8867:

Does anyone have an idea for this?

1
  • Is assets folder inside public folder? If it's not, then move it into public folder and it will work. Commented Jun 6, 2016 at 13:57

1 Answer 1

1

hello please add your css like this.

{!! Html::style('assets/css/style.css') !!}
Sign up to request clarification or add additional context in comments.

1 Comment

Please do note that Laravel 5 no longer has, by default, incorporated the Html facade. You'll have to manually add them into your project. They can be found 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.