From 2ff29c106883fe45367be967db3ce8ce5d30de99 Mon Sep 17 00:00:00 2001 From: Erick Tamayo Date: Wed, 24 Aug 2016 10:33:16 -0400 Subject: [PATCH] fixing config key + updating the Usage on README --- README.md | 2 +- src/ElasticsearchProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3d1468..f9f5eb7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ After you've published the Laravel Scout package configuration: ## Usage -Now you can use Laravel Scout as described [here](https://laravel-news.com/2016/08/laravel-scout-is-now-open-for-developer-testing/) +Now you can use Laravel Scout as described in the [official documentation](https://laravel.com/docs/5.3/scout) ## Credits - [Erick Tamayo](https://github.com/ericktamayo) diff --git a/src/ElasticsearchProvider.php b/src/ElasticsearchProvider.php index 0fef845..1572980 100644 --- a/src/ElasticsearchProvider.php +++ b/src/ElasticsearchProvider.php @@ -13,9 +13,9 @@ class ElasticsearchProvider extends ServiceProvider */ public function boot() { - $this->app[EngineManager::class]->extend('elasticsearch', function($app){ + resolve(EngineManager::class)->extend('elasticsearch', function($app){ return new ElasticsearchEngine(ElasticBuilder::create() - ->setHosts(config('scout.elastic.hosts')) + ->setHosts(config('scout.elasticsearch.hosts')) ->build(), config('scout.elasticsearch.index') );