We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5dbbf7e + 72b0c7f commit 7ad76d2Copy full SHA for 7ad76d2
config/config.php
@@ -11,5 +11,6 @@
11
'username' => env('ELASTICSEARCH_USERNAME', ''),
12
'password' => env('ELASTICSEARCH_PASSWORD', ''),
13
'ssl_verification' => env('ELASTICSEARCH_SSL_VERIFICATION', false),
14
+ 'handler' => null, // for call_user_func_array
15
],
16
];
src/ElasticClient.php
@@ -127,6 +127,10 @@ public static function fromConfig(array $config): static
127
$builder->setBasicAuthentication($config['username'], $config['password'] ?? '');
128
}
129
130
+ if (filled($config['handler'] ?? null)) {
131
+ $builder->setHandler(call_user_func_array($config['handler'], []));
132
+ }
133
+
134
return new static($builder->build());
135
136
0 commit comments