title: How to autoload 'libraries' in laravel 4?
body: <p>I've created a library folder in app folder to add my app libraries. I've updated app config file and composer.json to autoload that folder, but when I run the command <code>composer dump-autoload</code> I get the next error:</p>
  
  <blockquote>
    <p><code>{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'App\\Libraries\\Search\\SearchServiceProvider' not found","file":"D:\\Users\\Miguel Borges\\Documents\\Trabalhos\\Tese\\portal\\bootstrap\\compiled.php","line":4130}}PHP Fatal error:  Class 'App\Libraries\Search\SearchServiceProvider' not found in D:\Users\Miguel Borges\Documents\Trabalhos\Tese\portal\bootstrap\compiled.php on line 4130
        [Finished in 1.1s with exit code 255]</code></p>
  </blockquote>
  
  <p><strong>My app folder tree:</strong></p>
  
  <pre><code>app
  | ...
  + libraries
  | + search
  | | - Search.php
  | | - SearchFacade.php
  | | - SearchServiceProvider.php
  | + lib2
  | | - ...
  | + lib3
  | | - ...
  | | - Theme.php
  | - ...
  - filters.php
  - routes.php
  </code></pre>
  
  <p><strong>SearchServiceProvider.php</strong></p>
  
  <pre><code>namespace App\Libraries\Search;
  
  use Illuminate\Support\ServiceProvider;
  
  class SearchServiceProvider extends ServiceProvider {
  
      /**
       * Register the service provider.
       *
       * @return void
       */
      public function register()
      {
          $this-&gt;app['search'] = $this-&gt;app-&gt;share(function($app)
          {
              return new Search;
          });
      }
  
  }
  </code></pre>
  
  <p><strong>composer.json</strong></p>
  
  <pre><code>    "autoload": {
          "classmap": [
              "app/commands",
              "app/controllers",
              "app/models",
              "app/libraries",
              "app/database/migrations",
              "app/database/seeds",
              "app/tests/TestCase.php"
          ]
          // ,
    //       "psr-0": {
    //           "app": "app/libraries"
    //       }
      },
  </code></pre>
  
  <p>Basically, I need to autoload all the libraries within the 'libraries' folder.</p>