validate([ 'issue_no' => ['nullable', 'string'], 'id' => ['nullable', 'string'], 'status' => ['nullable', 'string'], ]); $search = request()->all(); $result = IssueService::paginate($search); } catch (ValidationException $e) { return $this->error(HttpStatus::VALIDATION_FAILED, $e->validator->errors()->first()); } catch (Exception $e) { return $this->error(intval($e->getCode())); } return $this->success($result); } }