title: Facades: aliasloader not found
body: <p>I want to write my own classes in Laravel that I can use in my controllers. I'm trying this with facades. </p>
  
  <p>This is my folder structure:</p>
  
  <pre><code>app
      classes
      facades
      serviceproviders
  </code></pre>
  
  <p>I autoloaded them in composer.json</p>
  
  <pre><code>    "app/facades",
      "app/classes",
      "app/serviceproviders"
  </code></pre>
  
  <p>My class (app/classes/DateRange.php)</p>
  
  <pre><code>&lt;?php namespace myMethods;
  
  class DateRange {
      public function doSomething()
      {
          echo 'Doing something!';
      }
  }
  </code></pre>
  
  <p>My facade (app/facades/DateRangeFacade.php)</p>
  
  <pre><code>&lt;?php namespace myMethods\Facades;
  use Illuminate\Support\Facades\Facade;
  
  class DateRangeFacade extends Facade {
      protected static function getFacadeAccessor() { return 'DateRange'; }
  }
  </code></pre>
  
  <p>My Serviceprovider (app/serviceproviders/DateRangeServiceProvider.php)</p>
  
  <pre><code>&lt;?php namespace myMethods;
  use Illuminate\Support\ServiceProvider;
  
  class DateRangeServiceProvider extends ServiceProvider {
      public function register()
      {
          $this-&gt;app['DateRange'] = $this-&gt;app-&gt;share(function($app)
          {
              return new DateRange;
          });
  
          $this-&gt;app-&gt;booting(function()
          {
              $loader = AliasLoader::getInstance();
              $loader-&gt;alias('DateRange', 'myMethods\Facades\DateRangeFacade');
          });
      }
  }
  </code></pre>
  
  <p>Also added 'myMethods\DateRangeServiceProvider' to providers array in app.php</p>
  
  <p>Opening the site, it displays 'Class 'myMethods\AliasLoader' not found'. Found a solution on stackoverflow to put a '\' before AliasLoader:: but that doesn't help.</p>
  
  <p>What am I doing wrong ? Thanks in advance.</p>