S
S
Super Star2017-08-22 21:54:22
Laravel
Super Star, 2017-08-22 21:54:22

Why css & js LARAVEL not loading?

It seems to have registered everything correctly, but for some reason there are a lot of errors in the console:

Failed to load resource: the server responded with a status style.css of 404 (Not Found)

But the correct way is:
<link rel="icon" href="http://landing/assets/css/style.css" type="image/png">

Full path to the folder with styles and scripts:
C:\openserver\domains\landing\public\assets
In the layout, I did everything according to Feng Shui:
<link rel="icon" href="{{ asset('assets/favicon.png') }}" type="image/png">
  <link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css">
  <link href="{{ asset('assets/css/style.css') }}" rel="stylesheet" type="text/css">
  <link href="{{ asset('assets/css/font-awesome.css') }}" rel="stylesheet" type="text/css">
  <link href="{{ asset('assets/css/animate.css') }}" rel="stylesheet" type="text/css">

  <!--[if lt IE 9]>
  <script src="{{ asset('assets/js/respond-1.1.0.min.js') }}"></script>
  <script src="{{ asset('assets/js/html5shiv.js') }}"></script>
  <script src="{{ asset('assets/js/html5element.js') }}"></script>
  <![endif]-->

And as a result, a bunch of errors and this:
69bf3ec112204d95925e8c22ff415a52.jpg
What did I do wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2017-08-22
@wielski

I did not create a symlink to the assets folder :)
And for good, you need to build in public, as in a static resource using Laravel Mix.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question