<?php

namespace Services;


use App\OrderIssue;
use Tests\TestCase;

class OrderIssueWorkGroupSync extends TestCase
{
    /**
     * @test
     */
    public function testSync()
    {
        $orderIssues = OrderIssue::query()->whereNotNull('user_workgroup_id')->get();
        foreach ($orderIssues as $orderIssue) {
            $orderIssue->userWorkgroups()->attach($orderIssue->user_workgroup_id);
        }
    }
}
