<?php

namespace Database\Seeders;

use App\Models\User;
use Hash;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $user1 = User::updateOrCreate(
            ['email' => 'dhanabalan.saravanan@cripumps.com'],
            [
                'name' => 'Dhanabalan S',
                'password' => bcrypt('SdHaNa@123'),
                'updated_at' => now(),
                'created_at' => now()
            ]
        );
        $user1->assignRole('Super Admin');

        $user2 = User::updateOrCreate(
            ['email' => 'ranjith@cripumps.com'],
            [
                'name' => 'Ranjith B',
                'password' => bcrypt('Ranjii@5503'),
                'updated_at' => now(),
                'created_at' => now()
            ]
        );
        $user2->assignRole('Super Admin');
        // User::factory()->count(5)->create();
    }
}
