I use Blade to include multiple subviews in one set of tabs in a blade application. All subtasks have the same general structure (sidebar and main section). Because of this, I created a template, and each subtask extends the template. Here is the structure:
Main.blade.php
<div id="tabs">
<ul>
@foreach($views as $view)
<li><a href="#{{$view}}">{{$view}}</a></li>
@endforeach
</ul>
@foreach($views as $view)
<div id="{{$view}}">
@include($view)
</div>
@endforeach
</div>
template.blade.php
{{-- formatting stuff --}}
@yield('content 1')
{{-- more formatting stuff --}}
@yield('content-2')
{{-- more formatting stuff --}}
tab -. * Blade.php
@extends('template')
@section('content-1')
This is tab [whatever number]
@stop
@section('content-2')
Lorem Ipsum
@stop
The obvious problem is that since each subtask extends the same template, @yield('content')there are 3 times, and all 3 included subtasks have their own @section('content'). What seems to be happening is that the first implementation of the sub-representation of the content section is placed in all 3 outputs.
. , , , THEN, . ?
tab - *. blade.php , . , , . , "" .
, , . @include (, ..), , . , , , , , .