<?php

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

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

class PermissionsTableSeeder extends Seeder
{
    public function run()
    {
        if (! Permission::where('name', 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController@index')->first()) {
            Permission::insert([
                'name' => 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController@index',
                'controller_path' => 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController',
                'controller_name' => 'AddressSettingController',
                'method_name' => 'index',
            ]);
        }

        if (! Permission::where('name', 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController@update')->first()) {
            Permission::insert([
                'name' => 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController@update',
                'controller_path' => 'App\\Http\\Controllers\\Admin\\Settings\\AddressSettingController',
                'controller_name' => 'AddressSettingController',
                'method_name' => 'update',
            ]);
        }
    }
}
