changes 0328092025

This commit is contained in:
Simon Pocrnjič
2025-09-28 22:36:47 +02:00
parent b40ee9dcde
commit 7e8e0a479b
61 changed files with 4306 additions and 654 deletions
+11 -7
View File
@@ -3,10 +3,9 @@
namespace Database\Seeders;
use App\Models\User;
use App\Models\Person\PersonType;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Support\Facades\Hash;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
@@ -17,11 +16,15 @@ public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
'password' => Hash::make("password")
]);
// Ensure a default test user exists (idempotent)
\App\Models\User::query()->updateOrCreate(
['email' => 'test@example.com'],
[
'name' => 'Test User',
'password' => Hash::make('password'),
'email_verified_at' => now(),
]
);
$this->call([
PersonSeeder::class,
@@ -29,6 +32,7 @@ public function run(): void
ActionSeeder::class,
EventSeeder::class,
ImportTemplateSeeder::class,
TestUserSeeder::class,
]);
}
}