public function find($id) { if (is_null(User::find($id))) { return Errors::invalidId($id); } return $this->repository->find($id); }
public function find($id) { try { return $this->repository->find($id); } catch (\Exception $e) { return ["error" => true, "message" => 'Registro não encontrado.', "messageDev" => $e->getMessage()]; } }
public function authenticated() { $userId = Authorizer::getResourceOwnerId(); $rtrn = $this->repository->find($userId); return $rtrn; }
public function authenticated() { $idUser = \Authorizer::getResourceOwnerId(); return $this->repository->find($idUser); }
/** * @return User */ public function authenticated() { return $this->repository->find(\Authorizer::getResourceOwnerId()); }