se modifica userfactory para entorno de producción
This commit is contained in:
@@ -24,21 +24,25 @@ class UserFactory extends Factory
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
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,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user