Skip to content

Commit e2da826

Browse files
committed
Updated update() and delete() URL
1 parent 06f23e7 commit e2da826

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function delete()
7070
{
7171
return $this->request->handleWithExceptions( function () {
7272

73-
return $this->request->client->delete( "{$this->entity}/{$this->{$this->primaryKey}}" );
73+
return $this->request->client->delete( "{$this->entity}/" . urlencode( $this->{$this->primaryKey} ) );
7474
} );
7575
}
7676

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

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

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

0 commit comments

Comments
 (0)