<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Modules\RolePermission\Entities\Permission;

class AddTwoFaModulePermissionTable extends Migration
{
    public function up()
    {

        $routes = [

            ['name' => 'Two FA', 'route' => 'twofa', 'parent_route' => null, 'type' => 1, 'module' => 'TwoFA'],
            ['name' => 'Settings', 'route' => 'admin.two_fa.settings', 'parent_route' => 'twofa', 'type' => 2, 'module' => 'TwoFA'],


        ];

        if (function_exists('permissionUpdateOrCreate')) {
            permissionUpdateOrCreate($routes);
        }
    }

    public function down()
    {

    }
}
