title: Laravel 8 - Facade Class Not Found
body: <p>I have been struggling with this after trying to replicate simple tutorials to get started a new project.</p>
  <p>Folllowing the tutorials here: <a href="https://medium.com/@cmanish049/creating-custom-facades-in-laravel-b9b72d573752" rel="nofollow noreferrer">https://medium.com/@cmanish049/creating-custom-facades-in-laravel-b9b72d573752</a></p>
  <ol>
  <li><p>Created The Helper Function</p>
  <pre><code> namespace App\CSVUtils;
  
    class CSVParser
    {
  
      public function sayHello()
      {
       echo &quot;Hello, from Facade class.&quot;;
      }
    }
  </code></pre>
  </li>
  <li><p>Created The Service Provider</p>
  <pre><code>&lt;?php
  
  namespace App\Providers;
  
  use Illuminate\Support\ServiceProvider;
  
  use App\CSVUtils\CSVParser;
  
  class CsvParserServiceProvider extends ServiceProvider
  {
   /**
    * Register services.
    *
    * @return void
    */
   public function register()
   {
       $this-&gt;app-&gt;bind('csvparser',function(){
  
           return new CSVParser();
  
        });
   }
  
   /**
    * Bootstrap services.
    *
    * @return void
    */
   public function boot()
   {
       $this-&gt;app-&gt;bind('csvparser',function(){
  
           return new CSVParser();
  
        });
     }
   }
  </code></pre>
  </li>
  <li><p>Created the Facade</p>
  <pre><code>&lt;?
  namespace App\CSVUtils;
  
  use Illuminate\Support\Facades\Facade;
  
  class CSVParserFacade extends Facade
  {
    protected static function getFacadeAccessor()
    {
      return 'csvparser';
    }
  }
  </code></pre>
  </li>
  <li><p>Added the following to the app/config.php (I did not remove any of the default entries just added the following</p>
  <pre><code>'providers' =&gt; [
       App\Providers\CsvParserServiceProvider::class,
       ...
     ],
  
   'aliases' =&gt; [
  
       'CSV' =&gt; App\CSVUtiles\CSVParserFacade::class,
  
       ...
   ]
  </code></pre>
  </li>
  <li><p>Called the Alias in the my controller</p>
  <pre><code>&lt;?php
  
    use Illuminate\Support\Facades\Route;
  
    Route::get('/csv', function () {
  
      CSV::sayHello();
  
     //return view('welcome');
    });
  </code></pre>
  </li>
  </ol>
  <p>RESULT:</p>
  <blockquote>
  <p>ErrorException Class &quot;App\CSVUtiles\CSVParserFacade&quot; not found
  http://localhost/csv</p>
  <p>Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
  vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php:80</p>
  </blockquote>
  <p>I have tried a bunch of things, renaming classes / files changing the namespace, calling the Facade directly (rather than from the alias)</p>
  <p>I have also tried the following:</p>
  <p>composer dump-autoload
  php artisan config:clear
  php artisan cache:clear
  php artisan clear-compiled</p>
  <p>And now I feel like I'm loosing my mind. It's been a busy day and my brain is fried but I'm hoping I am missing something simple.</p>
  <p>Please help!! :)</p>