title: How to extend multiple templates in Blade (Laravel 5)?
body: <p>I have the following files:</p>
  
  <p><strong>foo.blade.php</strong></p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;h1&gt;Foo Template&lt;/h1&gt;
        @yield('content')
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>bar.blade.php</strong></p>
  
  <pre><code>&lt;h2&gt;Bar Template&lt;/h2&gt;
  &lt;div class="bar-content"&gt;
  @yield('bar-content')
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to create another file that is able to extend both the above templates. e.g something like this:</p>
  
  <pre><code>@extends('foo')
  @section('content')
       &lt;p&gt;Hello World&lt;/p&gt;
       @extends('bar')
       @section('bar-content')
            &lt;p&gt;This is in div.bar-content&lt;/p&gt;
       @endsection
  @endsection
  </code></pre>
  
  <p>To give:</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;h1&gt;Foo Template&lt;/h1&gt;
        &lt;p&gt;Hello World&lt;/p&gt;
        &lt;h2&gt;Bar Template&lt;/h2&gt;
        &lt;div class="bar-content"&gt;
            &lt;p&gt;This is in div.bar-content&lt;/p&gt;
        &lt;/div&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can I do this?</p>