pases 5 ticket updates

This commit is contained in:
Mark Gregory
2026-06-23 11:10:52 +01:00
parent 2266298b6c
commit 7c4a94b5ea
12 changed files with 312 additions and 11 deletions
@@ -30,8 +30,8 @@ final class AgentAssignmentService
);
if ($categoryId !== null) {
$category = Category::query()->find($categoryId);
$agentIds = $category?->agents()->pluck('users.id')->all() ?? [];
$category = Category::query()->with('agents:id')->find($categoryId);
$agentIds = $category?->agents->pluck('id')->all() ?? [];
if ($agentIds !== []) {
$query->whereIn('id', $agentIds);