state !== 'enable') { throw new \Exception('用户状态异常'); } // 获取下级用户列表 $teamList = MemberUser::where('parent_id', $userId) ->where('state', 'enable') ->with(['coachUser']) // 关联技师信息 ->orderBy('created_at', 'desc') ->paginate(10); return $teamList; } }