subscriptionRepo = $subscriptionRepo; $this->datatableService = $datatableService; } /** * @return SubscriptionRepository */ protected function getRepo() { return $this->subscriptionRepo; } /** * @param $userId * * @return \Illuminate\Http\JsonResponse */ public function getDatatable($accountId) { $datatable = new SubscriptionDatatable(false); $query = $this->subscriptionRepo->find($accountId); return $this->datatableService->createDatatable($datatable, $query); } }