Skip to content

Commit c99d17d

Browse files
committed
Only set base uri if specified
This allows you to set the base uri inside a custom binding.
1 parent 97600c0 commit c99d17d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Providers/ServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ protected function registerClients()
5252
$this->app->extend(
5353
ClientInterface::class,
5454
static function (ClientInterface $client) {
55-
$client->setBaseUri(config('jsonapi.base_uri'));
55+
if ($baseUri = config('jsonapi.base_uri')) {
56+
$client->setBaseUri($baseUri);
57+
}
5658

5759
return $client;
5860
}

0 commit comments

Comments
 (0)