<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use App\Role;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('roles')->insert([
            [
                'name' => 'Super Admin',
                
            ],
            [
                'name' => 'Admin',
                
            ],
            [
                'name' => 'Employee',
                
            ],
            [
                'name' => 'Doctor',
                
            ],
            [
                'name' => 'Trainner',
                
            ],[
                'name' => 'Patient',
                
            ],
        ]);
        $role= Role::first();
        DB::table('users')->insert([
            [
                'name' => 'Super Admin',
                'email' => 'super@admin.com',
                'role_id' => $role->id,
                'email_verified_at' => now(),
                'password' => bcrypt('123456'), // password
                'remember_token' => Str::random(10),
            ],
            [
                'name' => 'Admin',
                'email' => 'admin@admin.com',
                'role_id' => $role->id,
                'email_verified_at' => now(),
                'password' => bcrypt('123456'), // password
                'remember_token' => Str::random(10),
            ],
            [
                'name' => 'Sub Admin',
                'email' => 'sub@admin.com',
                'role_id' => $role->id,
                'email_verified_at' => now(),
                'password' => bcrypt('123456'), // password
                'remember_token' => Str::random(10),
            ]
        ]);

    }
}
