src/ElasticsearchServiceProvider.php
protected function registerBindings()
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $config = $this->app['config']->get('elasticsearch', []);

        $this->app->/** @scrutinizer ignore-call */ singleton(ElasticsearchServiceContract::class, function () use ($config) {
            return new ElasticsearchService(ClientBuilder::fromConfig($config));
        });
    }
protected function registerBindings()
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $config = $this->app['config']->get('elasticsearch', []);

        $this->app->/** @scrutinizer ignore-call */ singleton(ElasticsearchServiceContract::class, function () use ($config) {
            return new ElasticsearchService(ClientBuilder::fromConfig($config));
        });
    }
protected function registerBindings ( ) { /** @noinspection PhpUndefinedMethodInspection */ $ config = $ this -> app [ 'config' ] -> get ( 'elasticsearch' , [ ] ) ; $ this -> app -> /** @scrutinizer ignore-call */ singleton ( ElasticsearchServiceContract :: class , function ( ) use ( $ config ) { return new ElasticsearchService ( ClientBuilder :: fromConfig ( $ config ) ) ; } ) ; }
Register bindings.
Register bindings .