diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index ea955ad0..cedde91f 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -24,20 +24,23 @@ class UserFactory extends Factory * * @return array */ - 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. diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 5da5cd45..8f7a5be5 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -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');