refactor: revamp the user seeder
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\User>
|
||||
@@ -17,7 +18,19 @@ class UserFactory extends Factory
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
//
|
||||
'uuid' => $this->faker->uuid(),
|
||||
'name' => $this->faker->name(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'email_verified_at' => Carbon::now(),
|
||||
'username' => $this->faker->userName(),
|
||||
'dob' => Carbon::now(),
|
||||
'password' => bcrypt($this->faker->password),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'password_last_updated' => Carbon::now(),
|
||||
'administratively_locked' => false,
|
||||
'registrationIp' => $this->faker->ipv4(),
|
||||
'currentIp' => $this->faker->ipv4(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user