| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | public function register() |
||
| 18 | { |
||
| 19 | |||
| 20 | $this->app->make(EngineManager::class)->extend('elastic', function () { |
||
| 21 | |||
| 22 | $hosts = $this->app['config']->get('services.scout-elastic.hosts'); |
||
| 23 | |||
| 24 | $client = ClientBuilder::create() |
||
| 25 | ->setHosts($hosts) |
||
| 26 | ->build(); |
||
| 27 | |||
| 28 | return new ScoutElasticEngine($client); |
||
| 29 | }); |
||
| 30 | |||
| 31 | $this->publishes([ |
||
| 32 | __DIR__ . '/../config/scout-elastic.php' => |
||
| 33 | $this->app['path.config'] . DIRECTORY_SEPARATOR . 'scout-elastic.php', |
||
| 34 | ]); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |