<?php

use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $userData = [
            [
                'name' => 'Amar Master Admin', 
                'email' => 'pareekpradeep786@gmail.com',
                'password' => '$2y$10$9BheV5/rkw30THEEWneooelvO/GsGXDX.ssaIH6x/sx/ItRNtkVjq',
                'phone' => '+91-9958859998',
                'username' => 'pradeep.p28',                
                'status' => 'ACTIVE',
                'created_at' => date('Y-m-d H:i:s'),
                'dob' => '1989-11-28'
            ],
            [
                'name' => 'Prakash Gujar', 
                'email' => NULL,
                'password' => '$2y$10$9BheV5/rkw30THEEWneooelvO/GsGXDX.ssaIH6x/sx/ItRNtkVjq',
                'phone' => '+91-9024911432',
                'username' => 'prakash.g',                
                'status' => 'ACTIVE',
                'created_at' => date('Y-m-d H:i:s'),
                'dob' => '1994-11-28'
            ],
            [
                'name' => 'Sandeep Pareek', 
                'email' => 's.pareek0874@gmail.com',
                'password' => '$2y$10$9BheV5/rkw30THEEWneooelvO/GsGXDX.ssaIH6x/sx/ItRNtkVjq',
                'phone' => '+91-9414220874',
                'username' => 'sandeep.p16',                
                'status' => 'ACTIVE',
                'created_at' => date('Y-m-d H:i:s'),
                'dob' => '1989-07-16'
            ],
            [
                'name' => 'Ram Avtaar Pareek', 
                'email' => 'salasarspares07@gmail.com',
                'password' => '$2y$10$9BheV5/rkw30THEEWneooelvO/GsGXDX.ssaIH6x/sx/ItRNtkVjq',
                'phone' => '+91-9413319707',
                'username' => 'ram.a11',                
                'status' => 'ACTIVE',
                'created_at' => date('Y-m-d H:i:s'),
                'dob' => '1965-12-11'
            ],
            [
                'name' => 'Mangal Singh Rathore', 
                'email' => NULL,
                'password' => '$2y$10$9BheV5/rkw30THEEWneooelvO/GsGXDX.ssaIH6x/sx/ItRNtkVjq',
                'phone' => '+91-6376745203',
                'username' => 'mangal.s',                
                'status' => 'ACTIVE',
                'created_at' => date('Y-m-d H:i:s'),
                'dob' => '1965-07-16'
            ]
            ];

        foreach ($userData as $item) {
            DB::table('users')->insert($item);
        }
        

        
        //$newUser->attachRole($madminRole);


        // $newUser->attachRole($adminRole);
        // $newUser = App\Models\User::where('email','=','pareekpradeep786@gmail.com')->first();
        // $newUser->attachRole($madminRole);

       // $permissions = config('roles.models.permission')::all();

        // foreach ($permissions as $permission) {
        //     $newUser->attachPermission($permission);
        // }

        /*
         * Add Users
         *
         */
        
    }
}
