title: Laravel 8, Model factory class not found
body: <p>so when using the new model factories class introduced in laravel 8.x, ive this weird issue saying that laravel cannot find the factory that corresponds to the model. i get this error</p>
  <pre><code>PHP Error:  Class 'Database/Factories/BusinessUserFactory' not found in .....
  
  </code></pre>
  <p>tho ive followed the laravel docs, ive no idea whats going on</p>
  <p>Here is the <code>BusinessUser</code> class</p>
  <pre><code>&lt;?php
  
  namespace App;
  
  use Database\Factories\BusinessUserFactory;
  use Illuminate\Database\Eloquent\Factories\HasFactory;
  use Illuminate\Database\Eloquent\Model;
  
  class BusinessUser extends Model
  {
      use HasFactory;
  }
  
  </code></pre>
  <p>and the factory</p>
  <pre><code>&lt;?php
  
  namespace Database\Factories;
  
  use App\BusinessUser;
  use Illuminate\Database\Eloquent\Factories\Factory;
  use Illuminate\Support\Str;
  
  class BusinessUserFactory extends Factory
  {
      /**
       * The name of the factory's corresponding model.
       *
       * @var string
       */
      protected $model = BusinessUser::class;
  
      /**
       * Define the model's default state.
       *
       * @return array
       */
      public function definition()
      {
          return [
              'name' =&gt; &quot;dsfsf&quot;
          ];
      }
  }
  
  
  </code></pre>
  <p>any ideas or leads is greatly appreciated.</p>