query); if ($query === '') { throw new BadRequestException('query is required'); } return $this->userRepo->search($query); } }