title: Accessing Laravel URL::Route from Custom Class
body: <p>I have begun implementing the Model-View-Presenter pattern in my Laravel application and I am running into the issue of not being able to access the URL::route service from my presenter class. I have created a "presenters" directory in the app directory.</p>
  
  <p>Here is the code for my presenter class:</p>
  
  <pre><code>namespace Presenter;
  
  class ViewListingPresenter implements Presenter
  {
      public function present($response)
      {
          $model = new ViewListingModel();
  
          ...
  
          $model-&gt;editButtonURL = URL::route('listings.edit', $response-&gt;id);
  
  
          ...
  
          return View::make('listings.show', compact('model'));
      }
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Symfony \ Component \ Debug \ Exception \ FatalErrorException
  Class 'Presenter\URL' not found
  </code></pre>
  
  <p>In the controller and view class I am able to use services such as Route::method or URL::method, but how do I access these from a custom class in a custom directory? What namespace or class do I need to include to be able to access this service?</p>