/** * Fetch all or a subset of resources * * @param array $params * @return ApiProblem|mixed */ public function fetchAll($params = array()) { try { $this->authService->hasRole(['admin', 'salesman']); return $this->repository->findAll(); } catch (\Exception $e) { return new ApiProblem($e->getCode(), $e->getMessage()); } }
public function findAll() { return $this->clientsRepository->findAll(); }
/** * Fetch all or a subset of resources * * @param array $params * @return ApiProblem|mixed */ public function fetchAll($params = array()) { return $this->repository->findAll(); }