*/ class UserFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = User::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'password' => bcrypt('password'), // default password 'profile_photo_path' => null, // set as null or use a faker image path if needed 'role' => 'user', // default role ]; } /** * Indicate that the model's email address should be unverified. * * @return $this */ }