这是我模板的结构:
master
@yield('master1')
@yield('master2')
dashboard
@extends('master')
@section('master1')
@include('sub-1')
submaster
@yield('submaster1')
sub-1
@extends('submaster')
@section('submaster1')
@section('master2') <-- this is what I am trying to do
这里有一个更直观的表现
master submaster
@yield('master1') @yield('submaster1')
@yield('master2') |
| |
|___ dashboard |
@extends('master') |
@section('master1') |
@include('sub-1') |
| |
|_______ sub-1 _______|
@extends('submaster')
@section('submaster1') <-- from the right
@section('master2') <-- from the left
Blade可以做到这一点吗?当我从master2
中删除sub-1
的实现时,一切正常。当我重新添加时,来自submaster
的代码继续呈现,master2
中的代码似乎正常工作并被包含在预期的位置,但submaster1
中的代码停止包含在submaster
。