fixed user api enable / disable endpoint issue.

This commit is contained in:
Cüneyt Şentürk 2022-10-25 12:15:57 +03:00
parent 8f349ee9c4
commit d264769a1d

View File

@ -89,6 +89,7 @@ class UpdateUser extends Job implements ShouldUpdate
} }
// Can't unassigned company, The company must be assigned at least one user. // Can't unassigned company, The company must be assigned at least one user.
if ($this->request->has('companies')) {
$companies = (array) $this->request->get('companies', []); $companies = (array) $this->request->get('companies', []);
$user_companies = $this->model->companies()->pluck('id')->toArray(); $user_companies = $this->model->companies()->pluck('id')->toArray();
@ -112,4 +113,5 @@ class UpdateUser extends Job implements ShouldUpdate
} }
} }
} }
}
} }