Skip to content

Commit

Permalink
lumen auto configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
basemkhirat committed Feb 18, 2017
1 parent 13e4288 commit dbf4abe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@

##### 3) Copy package config directory `vendor/basemkhirat/elasticsearch/src/config` to root folder alongside with `app` directory.

##### 4) Making Lumen read our configuration files by adding these lines in `bootstrap/app.php` before returning Lumen `$app` instance.

$app->configure("es");
$app->configure("scout");

##### 5) Making Lumen work with facades by uncommenting this line in `bootstrap/app.php`.

Expand Down
5 changes: 5 additions & 0 deletions src/ElasticsearchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public function boot()
$this->path . '/config/' => config_path(),
], "es.config");

// Auto configuration with lumen framework.

if (str_contains($this->app->version(), 'Lumen')) {
$this->app->configure("es");
}

// Resolve Laravel Scout engine.

Expand Down

0 comments on commit dbf4abe

Please sign in to comment.