diff --git a/src/Builder.php b/src/Builder.php index 5c29e52..fbb953f 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -78,6 +78,14 @@ public function buildEndpoint($options = []) continue; } + if (is_object($value)) { + if (isset($value->id)) { + $value = $value->id; + } else { + continue; + } + } + $endpoint = preg_replace("/:{$key}/", $value, $endpoint); }