title: Laravel Blade Conditional @Yield
body: <p>I have a blade view which makes use of my template using </p>
  
  <pre><code>@extends('layouts.master')
  </code></pre>
  
  <p>Within that template I want to show 2 buttons if the section on my child view is true, rather than having to include them in every child view that makes use of the template.</p>
  
  <p><strong>For example, my layout (snippet)</strong></p>
  
  <pre><code>@yield('buttons')
    &lt;div&gt;
      &lt;button&gt;BUTTON 1&lt;/button&gt;
      &lt;button&gt;BUTTON 2&lt;/button&gt;
    &lt;/div&gt;
  @show 
  
  @yield('content)
  </code></pre>
  
  <p><strong>Here's my child view</strong></p>
  
  <pre><code>@extends('layouts.master')
  
  @section('buttons',false)
  
  @section('content')
    &lt;p&gt;Hello world!&lt;/p&gt;
  @endsection
  </code></pre>
  
  <p>I know it doesn't work the way I've tried but is something like this possible? I've also tried wrapping the @yield('buttons') in an @if but this isn't possible as @yield can only be used in a function apparently.</p>