<?php

namespace Modules\Dummy\Database\Seeders\Core\Versions\V1_1_0;

use App\Models\Permission;
use Illuminate\Database\Seeder;

class PermissionsTableSeeder extends Seeder
{
    /**
     * Auto generated seed file
     *
     * @return void
     */
    public function run()
    {

        $permission = Permission::where(['name' => 'App\\Http\\Controllers\\Vendor\\Product\\ExportProductController@productExport'])->first();

        if (! $permission) {
            \DB::table('permissions')->insert([
                'name' => 'App\Http\Controllers\Vendor\Product\ExportProductController@productExport',
                'controller_path' => 'App\Http\Controllers\Vendor\Product\ExportProductController',
                'controller_name' => 'ExportProductController',
                'method_name' => 'productExport',
            ]);
        }
    }
}
