<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddOrderIssuePerformanceStaistics extends Migration
{


    protected $authNames = [ "订单管理-问题件-绩效统计"];

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        foreach ($this->authNames as $authName){
            \App\Authority::create(['name'=>$authName,'alias_name'=>$authName,'permission'=>'允许']);
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        foreach ($this->authNames as $authName){
            \App\Authority::where(['name'=>$authName,'alias_name'=>$authName])->delete();
        }
    }
}
