From 2533af98c8f2f8c0d0e2a04867d44cd0b7ee0b94 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Feb 2026 16:51:21 -0600 Subject: [PATCH] =?UTF-8?q?se=20modifica=20userfactory=20para=20entorno=20?= =?UTF-8?q?de=20producci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/factories/UserFactory.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index cedde91f..47ee0e87 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -24,21 +24,25 @@ class UserFactory extends Factory * * @return array */ - public function definition(): array + private static $fakerInstance; + +public function definition(): array { + if (!self::$fakerInstance) { + self::$fakerInstance = \Faker\Factory::create(); + } + + $faker = self::$fakerInstance; + return [ - 'name' => $this->faker->name(), - 'email' => $this->faker->unique()->safeEmail(), - 'telefono' => $this->faker->phoneNumber(), - 'direccion' => $this->faker->address(), + 'name' => $faker->name(), + 'email' => $faker->unique()->safeEmail(), + 'telefono' => $faker->numerify('##########'), + 'direccion' => $faker->address(), 'status' => 1, 'email_verified_at' => now(), 'password' => static::$password ??= Hash::make('password'), - 'two_factor_secret' => null, - 'two_factor_recovery_codes' => null, 'remember_token' => Str::random(10), - 'profile_photo_path' => null, - 'current_team_id' => null, ]; }