Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 81.82% |
Changes | 0 |
1 | <?php |
||
11 | final class ElasticSearchServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | 33 | public function register(): void |
|
17 | { |
||
18 | $this->app->bind(Client::class, function () { |
||
19 | 24 | return ClientBuilder::create()->setHosts([config('elasticsearch.host')])->build(); |
|
20 | 33 | }); |
|
21 | 33 | } |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 33 | public function boot(): void |
|
27 | { |
||
28 | 33 | $this->publishes([ |
|
29 | 33 | __DIR__.'/../config/elasticsearch.php' => config_path('elasticsearch.php'), |
|
30 | 33 | ], 'config'); |
|
31 | 33 | } |
|
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function provides(): array |
||
39 | } |
||
40 | } |
||
41 |