title: Laravel blade @include with @yield
body: <p>Is something similar to this possible in Laravel blade?</p>
  
  <pre><code>Route::get('blade', function () {
      return view('aMainPage');
  });
  </code></pre>
  
  <p><strong>aMainPage.blade.php</strong></p>
  
  <pre><code>@include('molecules.blocks.banner', ['background'=&gt; '/image.jpeg'])
     &lt;h1&gt;I am included&lt;/h1&gt;
  @endinclude
  </code></pre>
  
  <p><strong>/views/molecules/blocks/banner.blade.php</strong></p>
  
  <pre><code>@if($background)
  &lt;section class="banner" style="background-image:url('{{$background}}');"&gt;
  @else
  &lt;section class="banner"&gt;
  @endif
      &lt;h1&gt;Hello&lt;/h1&gt;
      @yield() {{- notice @yield here -}}
  &lt;/section&gt;
  </code></pre>
  
  <p><strong>Desired Output</strong></p>
  
  <pre><code>&lt;section class="banner" style="background-image:url('/image.jpeg');"&gt;
      &lt;h1&gt;Hello&lt;/h1&gt;
      &lt;h1&gt;I am included&lt;/h1&gt;
  &lt;/section&gt;
  </code></pre>
  
  <hr>
  
  <p>here is what the above currently renders</p>
  
  <p><strong>Actual Output</strong></p>
  
  <pre><code> &lt;section class="banner" style="background-image:url('/image.jpeg');"&gt;
      &lt;h1&gt;Hello&lt;/h1&gt;
  &lt;/section&gt;
  
  
      &lt;h1&gt;I am included&lt;/h1&gt;
  @endinclude
  </code></pre>