Home > Enterprise >  What is the default DB:seed password?
What is the default DB:seed password?

Time:12-08

In the DatabaseSeeder.php file there is this:

\App\Models\User::factory(10)->create();

But what is the password? I can see it is the same for each user but what is it? ;

CodePudding user response:

The UserFactory class create the password for each user. You can change that behavior, but the framework default is: password

class UserFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'name' => fake()->name(),
            'email' => fake()->unique()->safeEmail(),
            'email_verified_at' => now(),
            'password' => 'yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
            'remember_token' => Str::random(10),
        ];
    }
}
  • Related