title: laravel factory model not found
body: <p>im trying to create a new project with everything to know more about laravel, for now im creating models, migrations and seeds with factory and im running into this problem:</p>
  
  <p>Model User</p>
  
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class User extends Model implements Authenticatable
  {
  
    protected $table = 'user'; //name of the table in database
    protected $primaryKey = 'Id'; //Primary Key of the table
  
    /**
     * Relations between tables
     */
     public function GetLoginInfo()
     {
       return $this-&gt;hasMany('App\Models\LoginInfo', 'UserId');
     }
  
     public function getStatus()
     {
       return $this-&gt;belongsTo('App\Models\AccountStatus');
     }
  
  }
  </code></pre>
  
  <p>Model Account status</p>
  
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Model;
  
  class AccountStatus extends Model
  {
    protected $table = 'account_status'; //name of the table in database
    protected $primaryKey = 'Id'; //primary Key of the table
    public $timestamps = false; //true if this table have timestaps
    /**
     * Relations between tables
     */
     public function GetUsers()
     {
       return $this-&gt;hasMany('App\Models\Users', 'StatusId');
     }
  }
  </code></pre>
  
  <p>Seed file:</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Seeder;
  
  class UserSeeder extends Seeder
  {
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
      factory(App\Models\User::class, 5)-&gt;create();
    }
  }
  </code></pre>
  
  <p>factory file:</p>
  
  <pre><code>&lt;?php
  /** @var \Illuminate\Database\Eloquent\Factory $factory */
  
  //Factory for Account Status table
  $factory-&gt;define(App\Models\AccountStatus::class, function (Faker\Generator $faker) {
      return [
        'Description' =&gt; $faker-&gt;word,
      ];
  });
  
  //Factory for user table
  $factory-&gt;define(App\Models\User::class, function (Faker\Generator $faker) {
      return [
        'Username' =&gt; $faker-&gt;unique()-&gt;userName,
        'Password' =&gt; bcrypt('test'),
        'Email' =&gt; $faker-&gt;unique()-&gt;safeEmail,
        'Name' =&gt; $faker-&gt;name,
        'StatusId' =&gt; Factory(App\Models\AccountStatus::class)-&gt;create()-&gt;id,
      ];
  });
  </code></pre>
  
  <p>when trying to db seed with artisan:</p>
  
  <pre><code>  [Symfony\Component\Debug\Exception\FatalErrorException]
    Class 'App\Models\Model' not found
  </code></pre>
  
  <p>already trying composer dump-autoload , optimize and i have the models in a folder in App\Models.</p>
  
  <p>the seeds with factory for the account status work, but when i try to run for both (account status then user) i have that error) anyone knows why?
  and is good practice to have all the factory code in 1 file?</p>