title: PHP / Laravel - Conditionally show blade view
body: <p>I have below <code>app.blade.php</code> template:</p>
  
  <pre><code>&lt;!-- Sidebar Area --&gt;
  @if (\Request::is('*/fields*'))
      @include('streams.nav.editor-menu')
  @else
      @include('streams.nav.menu')
  @endif
  
  &lt;!-- Content area --&gt;
  @yield('content')
  </code></pre>
  
  <p>As you can see, up until now I have used below condition, to check whether a specific sidebar should be shown:</p>
  
  <pre><code>@if (\Request::is('*/fields/*'))
  </code></pre>
  
  <p>Above simply checks if the route contains the <code>fields</code> routes, as defined below:</p>
  
  <pre><code>Route::resource('streams/{stream}/fields', 'Stream\FieldsController');
  </code></pre>
  
  <p>Now, I've reached a point where I need to use this sidebar on another route resource:</p>
  
  <pre><code>Route::resource('streams/{stream}/documents', 'Stream\DocumentsController');
  </code></pre>
  
  <p>I could just add this to my <code>if</code> statement: </p>
  
  <pre><code>@if (\Request::is('*/fields*') or \Request::is('*/documents*')) 
  ...
  @endif
  </code></pre>
  
  <p>However, I suppose down the road that I would need to add even more routes to this statement. </p>
  
  <p>What would be the best approach to this? Would it be possible to maybe declare this in the <code>controller</code> or maybe even the <code>model</code>? Something like:</p>
  
  <pre><code>//Fields.php
  /**
   * Specifies whether the editor menu should be shown or not.
   *
   * @return bool
   */
  
  $sidebarEditor = true;
  </code></pre>
  
  <p>However, I am a bit unsure about how to implement this - or if there is a better approach?</p>