se modifica userfactory para crear tokens
This commit is contained in:
@@ -24,20 +24,23 @@ class UserFactory extends Factory
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'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,
|
||||
];
|
||||
}
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'telefono' => $this->faker->phoneNumber(),
|
||||
'direccion' => $this->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,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
|
||||
@@ -16,8 +16,8 @@ return new class extends Migration
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->unsignedBigInteger('telefono')->unique();
|
||||
$table->string('direccion');
|
||||
$table->string('telefono',20)->nullable()->unique();
|
||||
$table->string('direccion')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('code')->nullable();
|
||||
$table->boolean('status');
|
||||
|
||||
Reference in New Issue
Block a user