Exemplo n.º 1
0
 /**
  * Fetch all or a subset of resources
  *
  * @param  array $params
  * @return ApiProblem|mixed
  */
 public function fetchAll($params = array())
 {
     if (!$this->userService->isSalesMan()) {
         return new ApiProblem(415, 'Only admin can see all orders.');
     }
     return $this->orderService->fetchAll();
 }