Skip to content

Commit

Permalink
Updated update() and delete() URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kg-bot committed Mar 21, 2019
1 parent 06f23e7 commit e2da826
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 @@ -70,7 +70,7 @@ public function delete()
{
return $this->request->handleWithExceptions( function () {

return $this->request->client->delete( "{$this->entity}/{$this->{$this->primaryKey}}" );
return $this->request->client->delete( "{$this->entity}/" . urlencode( $this->{$this->primaryKey} ) );
} );
}

Expand All @@ -82,7 +82,7 @@ public function update( $data = [] )

return $this->request->handleWithExceptions( function () use ( $data ) {

$response = $this->request->client->put( "{$this->entity}/{$this->{$this->primaryKey}}", [
$response = $this->request->client->put( "{$this->entity}/" . urlencode( $this->{$this->primaryKey} ), [
'json' => $data,
] );

Expand Down

0 comments on commit e2da826

Please sign in to comment.