diff --git a/Modules/Agents/Services/AgentService.php b/Modules/Agents/Services/AgentService.php index ab1d22b..a51e5ea 100644 --- a/Modules/Agents/Services/AgentService.php +++ b/Modules/Agents/Services/AgentService.php @@ -268,7 +268,8 @@ class AgentService //execute query get list $listAgentGet = $myAgentDown->get(); - $allAgentInGeneral = $this->modelAgentUser->byParentPath($agentId)->joinAgent()->get(); + // get all by parent path with root + $allAgentInGeneral = $this->modelAgentUser->byParentPath($myAgent->agent_root_id)->joinAgent()->get(); $AgentById = []; if(!empty($allAgentInGeneral)){ foreach($allAgentInGeneral as $vAgent){