diff --git a/src/Utils/Model.php b/src/Utils/Model.php index a07c89d..3bd57bc 100644 --- a/src/Utils/Model.php +++ b/src/Utils/Model.php @@ -88,7 +88,7 @@ public function update( $data = [] ) $responseData = json_decode( (string) $response->getBody() ); - return new $this->modelClass( $this->request, $responseData->{$this->entity}[ 0 ] ); + return new $this->modelClass( $this->request, $responseData->{str_singular( $this->entity )} ); } ); }