示例#1
0
 /**
  * Fetch a resource
  *
  * @param  mixed $id
  * @return ApiProblem|mixed
  */
 public function fetch($id)
 {
     $user = $this->userService->getUserInfo();
     if (!$this->userService->isSalesMan()) {
         return new ApiProblem(415, 'Only salesman can list your own orders.');
     }
     return $this->orderService->fetch($id, $user->getId());
 }