Why can't laravel import files?
为情所困
为情所困 2017-06-28 09:27:44
0
2
862

I put the style file in the css folder under public. Why do I get an error when I introduce this file in the view like this?

<link href="/public/css/bootstrap.css" rel="stylesheet">
<script src="/public/css/jquery.min.js"></script>
<script src="/public/css/bootstrap.js"></script>

为情所困
为情所困

reply all(2)
扔个三星炸死你

Because the startup directory of Laravel is public, the website root directory / represents the folder corresponding to public, so there is no need to write public.

In addition, in Laravel, the address of the resource in the view is dynamically written through the template, so it is written

<link href="{{URL::asset('css/bootstrap.css')}}" rel="stylesheet">
过去多啦不再A梦

<link href="{{asset('css/bootstrap.css')}}" rel="stylesheet">

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template