Skip to content

Commit

Permalink
Fixed update method response
Browse files Browse the repository at this point in the history
  • Loading branch information
kg-bot committed Jan 26, 2019
1 parent 0a312ae commit 01e8fba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public function update( $data = [] )
'json' => $data,
] );

$responseData = json_decode( (string) $response->getBody() );
$responseData = collect( json_decode( (string) $response->getBody() ) );

return new $this->modelClass( $this->request, $responseData );
return new $this->modelClass( $this->request, $responseData->first() );
} );
}

Expand Down

0 comments on commit 01e8fba

Please sign in to comment.