title: @yield does not show content on Laravel
body: <p><strong>template/layout.blade.php</strong></p>
  <pre><code>&lt;title&gt;@yield('title', 'Default')&lt;/title&gt;
  </code></pre>
  <p><strong>test23.blade.php</strong></p>
  <pre><code>@extends('template.layout')
  
  @if($test == 1)
      &lt;p&gt;Done&lt;/p&gt;
      @yield('test')
  @endif
  </code></pre>
  <p><strong>TestController.php</strong></p>
  <pre><code>class TestController extends Controller
  {
      protected function getVars() 
      {
          $title = &quot;Funziona2s&quot;;
          $test = 1;
          //return view('test23', compact('title', 'test'));
          return view('test23')
              -&gt;withTitle('Titoloxd')
              -&gt;withTest(1);
      }
  }
  </code></pre>
  <p>the variables Title and Test I've passed are both not showing, anyone knows how to fix?</p>