adding css and js file in laravel 5.3

前端 未结 4 1021
萌比男神i
萌比男神i 2021-02-14 10:06

I want to include a css all css and js in single page and load it in all page.Now If I want to include bootstrap.css and bootstrap.js in welcome page I have included in welcome

4条回答
  •  深忆病人
    2021-02-14 10:56

    Here is the steps you can follow

    1. Create a master template layout
    2. Extend the master template in all pages and paste your link into header section

    To create a master template //master.blade.php

    
    
          @yield('header')
    
    
          @yield('page-body')
    
    
    

    Now Extend this layout in second.blade.php

    @extend('master.blade')
    @section('header')
       
    @endsection
    @section('page-body')
       {{!-- content of body --}}
    @endsection
    

提交回复
热议问题