<?php

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

class CreateRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        $dump = [
            'name' => ['admin', 'driver', 'mitra'],
        ];

        foreach ($dump['name'] as $key => $value) {
            $role = new Roles;
            $role->name = $value;
            $role->guard_name = 'web';
            $role->save();
        }
    }


    public function down()
    {
        
    }
}
