src/Laravel/ElasticsearchServiceProvider.php
public function registerIndexSingleton()
    {
        $this->app->singleton(Index::class, function ($app) {

            $settings = new IndexSettings(
                config('elasticsearch.index'),
                config('elasticsearch.settings'),
                config('elasticsearch.mappings')
            );

            $settings->setIndexables(config('elasticsearch.indexables'));

            return new Index($app[Client::class], $settings);
        });
    }
public function registerIndexSingleton()
    {
        $this->app->singleton(Index::class, function ($app) {

            $settings = new IndexSettings(
                config('elasticsearch.index'),
                config('elasticsearch.settings'),
                config('elasticsearch.mappings')
            );

            $settings->setIndexables(config('elasticsearch.indexables'));

            return new Index($app[Client::class], $settings);
        });
    }
public function registerIndexSingleton ( ) { $ this -> app -> singleton ( Index :: class , function ( $ app ) { $ settings = new IndexSettings ( config ( 'elasticsearch.index' ) , config ( 'elasticsearch.settings' ) , config ( 'elasticsearch.mappings' ) ) ; $ settings -> setIndexables ( config ( 'elasticsearch.indexables' ) ) ; return new Index ( $ app [ Client :: class ] , $ settings ) ; } ) ; }
Register index instance

@return void
Register index instance