<?php

namespace Modules\StorageDriver\Database\Seeders\versions\v2_2_3;

use Illuminate\Database\Seeder;
use Modules\MenuBuilder\Http\Models\MenuItems;

class MenuItemsTableSeeder extends Seeder
{

    /**
     * Auto generated seed file
     *
     * @return void
     */
    public function run()
    {

        $configuration = MenuItems::where(['label' => 'Configurations', 'parent' => 0])->first();
        
        addMenuItem('admin', 'Storage Drivers', [
            'link' => 'storagedriver',
            'params' => '{"permission":"Modules\\\\StorageDriver\\\\Http\\\\Controllers\\\\StorageDriverController@index", "route_name":["storagedriver", "configstoragedriver"]}',
            'parent' => $configuration?->id ?? 0,
            'sort' => 56,
        ]);
    }
}
