From 4ac814248424df57af9ffcd517b0f66257db22bd Mon Sep 17 00:00:00 2001 From: Stefan Ninic Date: Thu, 21 Mar 2019 12:25:42 +0100 Subject: [PATCH] Fixed model update --- src/Utils/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )} ); } ); }