paginate($this->getLimitPerPage()); return ComplianceResource::collection($terms); } /** * Get the detail of a given term. * @param Request $request * @return \Illuminate\Http\Response */ public function show(Request $request, $termId) { try { $term = Term::where('id', $termId) ->firstOrFail(); } catch (ModelNotFoundException $e) { return $this->respondNotFound(); } return new ComplianceResource($term); } }