title: Outputting A Custom Blade Partial from Sober Controller
body: <p>So, for my template, I'm creating a block of code that runs custom "Modules".  Basically, they are a custom post type, with fields built in ACF.  Each of these modules has their own Blade template (e.g. /resources/views/modules/brandwindow.blade.php).</p>
  
  <p>I've also created a Blade template for a custom post type called "Modular Page".  On this template, I handle all the calls for each and any module called in a loop.  I want to be able to handle this login in a controller, however.  So, I created a Controller called "LoadModules" that will handle that request.</p>
  
  <p>I'm having some difficulty calling a Blade template from a Controller, though.  In a function GetModules(), I loop through the ACF repeater to see which module I need to load, and then supply all the relevant fields with another Controller specific to that Module (e.g. if module = 'bwindow', Call BrandWindow->BrandWindowFields).  This returns an array which I can then pass into a View.</p>
  
  <p>I've added the View class to the top of the Controller (like you would in Laravel), but I'm pretty sure I'm doing something wrong here.  I'm getting the following error:
      Class 'View' not found in ..\app\Controllers\LoadModules.php on line 25</p>
  
  <p>Here's my Controller code:</p>
  
  <blockquote>
  <pre><code>public static function GetModules()
  {
      $brand_window_loader = new BrandWindow;
      $module_array = get_sub_field('content_type');
      if ($module_array == 'bwindow') {
          // Do Brand Window Stuff
          $windows = $brand_window_loader-&gt;GetBrandWindows();
          $output = '';
          foreach ( $windows as $window ){
              $feild_array = $brand_window_loader-&gt;BrandWindowFields($window);
              $output .= View::make('modules.brandwindow', $feild_array);
          }
          return $output;
      } elseif ($module_array == 'blogfeed') {
          // Do Blog Feed Stuff
          return $module_array;
      }
  }
  </code></pre>
  </blockquote>
  
  <p>Line 25, is throwing the error which is:</p>
  
  <blockquote>
  <pre><code>$output .= View::make('modules.brandwindow', $feild_array);
  </code></pre>
  </blockquote>
  
  <p>The <strong>$brand_window_loader->BrandWindowFields($window)</strong> is just an array of keyed values it pulls from ACF using the ID of the post.</p>
  
  <blockquote>
  <pre><code>'title' =&gt; 'Title',
  'sub_text' =&gt; 'Sub Text',
  'url' =&gt; 'http://example.com'
  ETC.
  </code></pre>
  </blockquote>
  
  <p>The error is obviously related to the "View" class not existing, so I'm wondering if I've namespaced or the View class does not exist with Sage 9/Bedrock.  If that's true, what is the best way to include a Blade template from a Controller?</p>
  
  <p>Thanks</p>