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