activityRepo = $activityRepo; $this->datatableService = $datatableService; } /** * @param null $clientPublicId * * @return \Illuminate\Http\JsonResponse */ public function getDatatable($clientPublicId = null) { $clientId = Client::getPrivateId($clientPublicId); $query = $this->activityRepo->findByClientId($clientId); return $this->datatableService->createDatatable(new ActivityDatatable(false), $query); } }