<?php

namespace Database\Seeds;

use App\Models\Admin;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;

class MenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('menus')->insert([
            [
                'id' => 61,
                'title' => 'Role Manager',
                'url' => '/admin/roles',
                'icon' => 'mdi mdi-account-key-outline',
                'parent_id' => 62,
                'order' => 1,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ],
            [
                'id' => 62,
                'title' => 'System Administrator',
                'url' => '#',
                'icon' => 'mdi mdi-cog-outline',
                'parent_id' => null,
                'order' => 99,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ],
            [
                'id' => 63,
                'title' => 'Users List Accounts',
                'url' => '/admin/admins',
                'icon' => 'mdi mdi-account-group',
                'parent_id' => 62,
                'order' => 0,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ]
        ]);


        DB::table('role_menu')->insert([
            [
                'role_id' => 1,
                'menu_id' => 61,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ],
            [
                'role_id' => 1,
                'menu_id' => 62,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ],
            [
                'role_id' => 1,
                'menu_id' => 63,
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ]
        ]);
    }
}
