adding css and js file in laravel 5.3

前端 未结 4 556
春和景丽
春和景丽 2021-02-14 10:18

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:53

    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
    

提交回复
热议问题