diff --git a/src/ExplorerServiceProvider.php b/src/ExplorerServiceProvider.php index e6f1d55..f819257 100644 --- a/src/ExplorerServiceProvider.php +++ b/src/ExplorerServiceProvider.php @@ -22,7 +22,7 @@ public function boot(): void } resolve(EngineManager::class)->extend('elastic', function () { - $client = ClientBuilder::create()->setHosts(config('explorer.connection'))->build(); + $client = ClientBuilder::create()->setHosts([config('explorer.connection')])->build(); return new ElasticEngine($client); }); diff --git a/src/Infrastructure/Console/ElasticCreate.php b/src/Infrastructure/Console/ElasticCreate.php index 3e836d5..67a07ad 100644 --- a/src/Infrastructure/Console/ElasticCreate.php +++ b/src/Infrastructure/Console/ElasticCreate.php @@ -20,8 +20,8 @@ class ElasticCreate extends Command public function handle(): int { - $this->client = ClientBuilder::create()->setHosts(config('explorer.connection'))->build(); - + $this->client = ClientBuilder::create()->setHosts([config('explorer.connection')])->build(); + $config = config('explorer'); if (!$config) { diff --git a/src/Infrastructure/Console/ElasticDelete.php b/src/Infrastructure/Console/ElasticDelete.php index 3e8b8e0..3055292 100644 --- a/src/Infrastructure/Console/ElasticDelete.php +++ b/src/Infrastructure/Console/ElasticDelete.php @@ -19,7 +19,7 @@ class ElasticDelete extends Command public function handle(): int { - $this->client = ClientBuilder::create()->setHosts(config('explorer.connection'))->build(); + $this->client = ClientBuilder::create()->setHosts([config('explorer.connection')])->build(); $config = config('explorer'); if (!$config) {