Where to put css file in laravel project

后端 未结 4 1567
梦如初夏
梦如初夏 2021-01-11 15:53

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

相关标签:
4条回答
  • 2021-01-11 16:27

    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.

    0 讨论(0)
  • 2021-01-11 16:36

    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') }}" />
    
    0 讨论(0)
  • 2021-01-11 16:36

    <link rel="stylesheet" href="css/app.css">

    simply add this your blade.php file

    0 讨论(0)
  • 2021-01-11 16:48
    1. search for Public folder in laravel

    2. 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>
    
    0 讨论(0)
提交回复
热议问题