Skip to content

Commit

Permalink
Merge pull request #23 from Jeroen-G/fix/connection-parameters
Browse files Browse the repository at this point in the history
Fixes connection building
  • Loading branch information
Jeroen-G authored Dec 6, 2020
2 parents 140087d + 7081ac0 commit 24f2993
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ExplorerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
4 changes: 2 additions & 2 deletions src/Infrastructure/Console/ElasticCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Console/ElasticDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 24f2993

Please sign in to comment.