<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // User::factory(10)->create();

        // Create Admin User
        User::updateOrCreate(
            ['email' => 'admin@rtlhkabmagelang.com'], // Ganti dengan email login yang diinginkan
            [
                'name' => 'Admin RTLH',
                'password' => \Illuminate\Support\Facades\Hash::make('password'), // Ganti 'password' dengan password yang dimau
                'email_verified_at' => now(),
            ]
        );
    }
}
