Update factory and seed

This commit is contained in:
Quentin T'JAMPENS
2025-10-27 22:33:52 +01:00
parent a3c418de46
commit 9cf93d93c7
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -25,10 +25,12 @@ class UserFactory extends Factory
{
return [
'name' => fake()->name(),
'lastname' => fake()->lastname(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
'validate' => rand(0, 1),
'role' => rand(2, 5)
];
}
+3
View File
@@ -18,6 +18,9 @@ class DatabaseSeeder extends Seeder
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
'role' => 1
]);
User::factory()->count(10)->create();
}
}