title: Laravel yield parent section in child view
body: <p>Is there a way to yield a section in a child view declared in a parent view ?</p>
  
  <p>if I yield('custom_code') in master view its working.</p>
  
  <p>What I am doing wrong  ?</p>
  
  <p>Master view</p>
  
  <pre><code>&lt;html&gt;
      @include('client.acccount')
  
      &lt;h1&gt;In Master&lt;/h1&gt;
  
      @yield('bookInfo')
  &lt;/html&gt;
  </code></pre>
  
  <p>Child View</p>
  
  <pre><code>@extends('layouts.Master')
  
  /*
      I also tried that
  
      @section('custom_code')
          @parent
      @endsection
  */
  
  @section('bookInfo')
      &lt;h1&gt;In Child View&lt;/h1&gt;
      @yield('custom_code')
  @endsection
  </code></pre>
  
  <p>client.acccount file</p>
  
  <pre><code>@include('load_db_code')
  </code></pre>
  
  <p>load_db_code file</p>
  
  <pre><code>&lt;?php
      $agent = Agent::find(Auth::id());
      $lang = Cache::get("lang");
  
      $temp = "";
  
      if (Session::has('demo'))
      {
          $temp = "temp_";
      }
  ?&gt;
  
      @if($lang == 'fr')
          @if($agent-&gt;apparenceb2c-&gt;{$temp.'header_fr'} != "")
              @section('custom_code')
                  {{ $agent-&gt;apparenceb2c-&gt;{$temp.'header_fr'} }}
              @endsection
          @endif
      @endif
  </code></pre>