How to include a sub-view in Blade templates?

后端 未结 4 1200
日久生厌
日久生厌 2020-11-28 12:46

I am trying to set up a site using laravel, but I\'m really having trouble with basic things that the documentation just doesn\'t cover.

In this case, I see that it

4条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 12:55

    As of Laravel 5.6, if you have this kind of structure and you want to include another blade file inside a subfolder,

    |--- views

    |------- parentFolder (Folder)

    |---------- name.blade.php (Blade File)

    |---------- childFolder (Folder)

    |-------------- mypage.blade.php (Blade File)

    name.blade.php

      
          @include('parentFolder.childFolder.mypage')
      
    

提交回复
热议问题