Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function boot() |
||
41 | { |
||
42 | $this->publishes([ |
||
43 | __DIR__ . '/config/elasticsearch.php' => config_path('elasticsearch.php'), |
||
|
|||
44 | ]); |
||
45 | |||
46 | resolve(EngineManager::class)->extend('elasticsearch', function () { |
||
47 | return new ElasticSearchEngine( |
||
48 | ElasticSearchBuilder::create()->setHosts(Config::get('elasticsearch.hosts'))->build(), |
||
49 | Config::get('elasticsearch.index') |
||
50 | ); |
||
51 | }); |
||
52 | |||
53 | if ($this->app->runningInConsole()) { |
||
54 | $this->commands([ |
||
55 | CreateElasticSearchIndex::class, |
||
56 | ]); |
||
60 |