问题
I have been searching for an answer to this question with no luck. This is my second day using laravel and I'm trying to create a custom 404 error page. I don't know where/how to include my .css file. Can someone please help me with this?
回答1:
Place your css files inside public folder and use link tag in html document (or 404 template)
Example
<link rel="stylesheet" type="text/css" href="{{ url('/css/style.css') }}" />
回答2:
The best way is using blade syntax with the laravel helper for what you need
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
this folder css
or whatever you named it, must be placed inside your public folder.
回答3:
search for Public folder in laravel
Create css folder(That contain stylesheet files of your project), javascript,and Images folder (contain images that you will use in your project).
. Go to layouts in app.blade.php file update html code using blade sintax .
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
and JS
<script src="{{ asset('pickadate/lib/picker.js')}}"></script>
回答4:
<link rel="stylesheet" href="css/app.css">
simply add this your blade.php file
来源:https://stackoverflow.com/questions/33988896/where-to-put-css-file-in-laravel-project