<?php

namespace Modules\UserType\Database\Seeders;

use App\User;
use Illuminate\Database\Seeder;

class UserTypeDatabaseSeeder extends Seeder
{
    public function run()
    {
        $users = User::select('id', 'role_id')->get();
        foreach ($users as $user) {
            $user->userRoles()->sync($user->role_id);
        }
    }
}
