A
A
Al Sm2017-07-19 15:35:20
Laravel
Al Sm, 2017-07-19 15:35:20

Styles not loading in new blade?

Greetings. I'm just starting to learn Laravel 5.4, I ran into a problem, the solution of which I can't find yet.
In the 'views' directory, I created a new 'posts', created a controller, a post.blade.php page, and added a route.
When accessing the page, for some reason styles are not loaded, that is, a header with authorization is displayed, but without styles. Due to the fact that the page is in a subdirectory, it cannot find the path to css.
How can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-07-19
@alexey-m-ukolov

{{ asset('/assets/css/header.css') }}
The path must be absolute from the public directory .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question