<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
{
    // Akun Admin (Jika sudah ada, tidak akan duplikat lagi)
    \App\Models\User::updateOrCreate(
        ['email' => 'admin@gmail.com'], // Cek berdasarkan email
        [
            'name' => 'Admin Es Teh',
            'password' => bcrypt('12345'),
        ]
    );

    // Akun Kasir (Data baru yang mau kamu tambahkan)
    \App\Models\User::updateOrCreate(
        ['email' => 'kasir@gmail.com'],
        [
            'name' => 'Kasir Es Teh',
            'password' => bcrypt('12345'),
        ]
    );
}
}
