Cviebrock\LaravelElasticsearch\ServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        $app = $this->app;
        $app->singleton('elasticsearch.factory', function ($app) {
            return new Factory();
        });
        $app->singleton('elasticsearch', function ($app) {
            return new Manager($app, $app['elasticsearch.factory']);
        });
        $app->singleton(Client::class, function ($app) {
            return $app['elasticsearch']->connection();
        });
    }
ServiceProvider