title: How to create a default login user account when seeding users?
body: <p>I want a way to have a "default login" so that when I do a <code>php artisan migrate:refresh</code> on my database I can seed a bunch of users in PLUS have a user account with the same email and password everytime. What is the best way of achieving this? I thought maybe having the standard user factory plus creating a Default user factory would work but since it's using the same User class it just creates a new standard user.</p>
  
  <p><strong>UserFactory.php</strong></p>
  
  <pre><code>
  /** @var \Illuminate\Database\Eloquent\Factory $factory */
  
  use App\User;
  use Faker\Generator as Faker;
  use Illuminate\Support\Str;
  
  
  $factory-&gt;define(User::class, function (Faker $faker) {
      return [
          'name' =&gt; $faker-&gt;name,
          'email' =&gt; $faker-&gt;unique()-&gt;safeEmail,
          'email_verified_at' =&gt; now(),
          'password' =&gt; '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
          'remember_token' =&gt; Str::random(10),
      ];
  });
  </code></pre>
  
  <p><strong>DefaultUserFactory.php</strong></p>
  
  <pre><code>
  /** @var \Illuminate\Database\Eloquent\Factory $factory */
  
  use App\User;
  use Faker\Generator as Faker;
  use Illuminate\Support\Str;
  
  $factory-&gt;define(User::class, function (Faker $faker) {
      return [
           'name' =&gt; $faker-&gt;name,
           'email' =&gt; 'test@demo.com',
           'email_verified_at' =&gt; now(),
           'password' =&gt; bcrypt('demo123'), // password
           'remember_token' =&gt; Str::random(10),
      ];
  });
  </code></pre>