title: How to include blade template when it inside another element
body: <p>I have a layout contain header include navbar and slider image.</p>
  
  <p>My <code>views</code> folder has structure like:</p>
  
  <pre><code>+ layouts
     - index.blade.php
     - master.blade.php
  
  + posts
     - list.blade.php
  
  + partials
     - navbar.blade.php
     - footer.blade.php
  </code></pre>
  
  <p>Note: </p>
  
  <p><code>+</code> is <code>a folder</code>. </p>
  
  <p><code>-</code> is <code>blade template file</code></p>
  
  <p>Normally, in the <code>master.blade.php</code> is declare css/js file, include navbar and footer blade template.</p>
  
  <p>But navbar inside a <code>div#home</code>, this element contains navbar and slider.</p>
  
  <pre><code>&lt;section id="home"&gt;
      @include('partials.navbar')
      &lt;!-- slider start --&gt;
      @yield('slider_images')
      &lt;!-- slider end --&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>So, I can't split navbar to insert into <code>master.blade.php</code>. You can see <code>master.blade.php</code> like:</p>
  
  <pre><code>//add some js and css.
  &lt;body&gt;
  
    @yield('content')
  
    @include('partials.footer')
  
  &lt;/body&gt;
  </code></pre>
  
  <p>I don't add line: <code>@include('partials.navbar')</code> because it include a slide.</p>
  
  <p>The temporary solution is to add it into <code>index.blade.php</code>.</p>
  
  <p>But the problem is: I have a child page, it <code>@extends('layouts.master')</code>. But the <code>layout.master</code> don't have contained <code>partials.navbar</code>. It only needs navbar and footer, don't need the slider.</p>
  
  <p>Have any method to do this without change structure of HTML file.</p>