title: Laravel 4: Using views in a package
body: <p>I've created a very basic app in Laravel 4, it's something I'll be reusing a lot in various projects so it made sense to convert it to a package before i got too far, but I'm struggling to make the changes to get it working, which I think is largely due to figuring out how to access the various objects that are normally available in an app, eg View::make</p>
  
  <p>I had the following code working in an app:</p>
  
  <pre><code>class PageController extends BaseController {
  
  public function showPage($id)
  {
              //do stuff
              return View::make('page/showPage')
                   -&gt;with('id', $id)
                   -&gt;with('page', $page);
  }
  </code></pre>
  
  <p>for the package I have the following:</p>
  
  <pre><code>use Illuminate\Routing\Controllers\Controller;
  use Illuminate\Support\Facades\View;
  
  class PageController extends Controller {
  
  public function showPage($id)
  {
        //do stuff        
        return View::make('page/showPage')
                   -&gt;with('id', $id)
                   -&gt;with('page', $page);
  }
  </code></pre>
  
  <p>However this does not load the blade template which is located at:</p>
  
  <pre><code>workbench/packagenamespace/package/src/views/page/showPage.blade.php
  </code></pre>
  
  <p>nor does this work:</p>
  
  <pre><code>return View::make('packagenamespace/package/src/page/showPage')
  </code></pre>
  
  <p>Also, I am wondering if what i have done with the use statements where I use the facade object correct, to me it seems like there should be a neater way to access things like the View object?</p>