<?php

namespace Database\Seeders;

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

class UserDummySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $userData = [
            [
                'name'=>'RafiAnwar',
                'email' => 'email@gmail.com',
                'role' => 'user',
                'password'=>Hash::make('123456'),
            ],[
                'name'=>'Admin',
                'email' => 'admin@gmail.com',
                'role' => 'admin',
                'password'=>Hash::make('123456'),

            ]
        ];

        foreach ($userData as $key => $value) {
            User::create($value);
        }
    }
}
