title: Laravel 4 workbench class not found
body: <p>I'm trying to develop a package in laravel 4 - my first attempt at a package. 
  I found a couple of tutorials which I've tried to follow:</p>
  
  <pre><code>http://jasonlewis.me/article/laravel-4-develop-packages-using-the-workbench
  </code></pre>
  
  <p>and </p>
  
  <pre><code>http://culttt.com/2013/06/24/creating-a-laravel-4-package/
  </code></pre>
  
  <p>and of course in the official documentation.</p>
  
  <p>I've followed the basic structure to create the framework. However on loading the app I get a class not found error. This relates directly to the serviceprovider I have placed in the app.php file.</p>
  
  <p>here's my entry in the providers array:</p>
  
  <pre><code>'Longestdrive\Calendar\CalendarServiceProvider'
  </code></pre>
  
  <p>My folder structure is:</p>
  
  <pre><code> laravel/workbench/longestdrive/calendar/src/Longestdrive/Calendar
  </code></pre>
  
  <p>My service provider has the following entries:</p>
  
  <pre><code>&lt;?php namespace Longestdrive\Calendar;
  
  use Illuminate\Support\ServiceProvider;
  
  class CalendarServiceProvider extends ServiceProvider {
  
      /**
       * Indicates if loading of the provider is deferred.
       *
       * @var bool
       */
      protected $defer = false;
  
      /**
       * Bootstrap the application events.
       *
       * @return void
       */
      public function boot()
      {
          $this-&gt;package('longestdrive/calendar');
      }
  
      /**
       * Register the service provider.
       *
       * @return void
       */
      public function register()
      {
          //
      }
  
      /**
       * Get the services provided by the provider.
       *
       * @return array
       */
      public function provides()
      {
          return array();
      }
  
  }
  </code></pre>
  
  <p>I've double checked to spelling and ran a composer dump-autoload both from the root of the project and the root of the package.</p>
  
  <p>I've run out of ideas for solving the class not found  any ideas where I've gone wrong?</p>
  
  <p>The line producing the error is this one:</p>
  
  <pre><code>C:\wamp\www\googleapi\laravel\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php
  </code></pre>
  
  <p>Any help appreciated</p>
  
  <p>Thanks</p>
  
  <p>Update:
  I ran a composer update as suggested in the workbench/package folder with a response nothing to update. I then ran composer at the root of the project and an error was produced: </p>
  
  <pre><code>[RuntimeException]
    Error Output: PHP Fatal error:  Class 'Longestdrive\Calendar\CalendarServiceProvider' not found
     in C:\wamp\www\googleapi\laravel\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRe
    pository.php on line 123
  </code></pre>
  
  <p>I probably posted the wrong error line earlier. The full exception response is:</p>
  
  <pre><code>Class 'Longestdrive\Calendar\CalendarServiceProvider' not found
  </code></pre>
  
  <p>THe error extract:</p>
  
  <pre><code>* @param \Illuminate\Foundation\Application $app
  * @param string $provider
  * @return \Illuminate\Support\ServiceProvider
  */
  public function createProvider(Application $app, $provider)
  {
  return new $provider($app);
  }
  </code></pre>
  
  <p>which I assume relates to the service provider loader not finding the CalendarServiceProvider?</p>