title: include nested views if exists in blade, laravel 5
body: <p>I am trying to include another view if it exists. I have a main <code>page.blade.php</code> which should render the content of the selected page. in the back-end of the application I get a flat array with all the content in it (id and name). So now if a template exists I want to render it but first I need to check if the template actually exists.</p>
  
  <p>I got the following code right now:</p>
  
  <pre><code>@foreach($flattenPage as $page)
      @if(file_exists('templates.'.strtolower($page['name'])))
          @include('templates.'.strtolower($page["name"]))
      @endif
  @endforeach
  </code></pre>
  
  <p>The problem is that it won't get through the if statement. 
  I also tried: </p>
  
  <pre><code>@if(file_exists('../templates/'.strtolower($page['name']).'.blade.php'))
  </code></pre>
  
  <p>The current template is <code>views/page/show.blade.php</code> and I need to render <code>views/templates/myContent.blade.php</code></p>