<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Spatie\Permission\Models\Role;

class RoleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        $data = [
            ['Admin','web'],
            ['Support Executive','web'],
            ['Support Manager','web'],
            ['Accounts Manager','web'],
            ['Accounts Executive','web'],
            ['Asst. Manager','web'],
            ['Store Manager','web'],
            ['Reseller Admin','web'],
            ['Account Manager X','web'],
            ['Accounts','web'],
            ['Sub Reseller','web'],
            ['Reseller','web'],
            ['Billing Man','web'],
            ['Marketing Manager','web'],
            ['Reseller user','web'],
            ['Reseller Technician','web'],
            ['Sub Reseller Technician','web'],

        ];

        foreach($data as $d){
            if(Role::where('name',$d[0])->count() < 1){
                Role::create([
                    'name' => $d[0],
                    'guard_name' => $d[1]
                ]);
            }
        }


    }

}
