Skip to content

Commit

Permalink
Merge pull request #8 from spira/master
Browse files Browse the repository at this point in the history
Switched from Config facade to config() helper function for Lumen compatibility
  • Loading branch information
timgws committed Aug 20, 2015
2 parents e705456 + 9e156f6 commit d2ebffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ElasticquentCollectionTrait.php
Expand Up @@ -85,8 +85,8 @@ public function getElasticSearchClient()
{
$config = array();

if (\Config::has('elasticquent.config')) {
$config = \Config::get('elasticquent.config');
if (config()->has('elasticquent.config')) {
$config = config()->get('elasticquent.config');
}

return new \Elasticsearch\Client($config);
Expand Down
8 changes: 4 additions & 4 deletions src/ElasticquentTrait.php
Expand Up @@ -57,8 +57,8 @@ public function getElasticSearchClient()
{
$config = array();

if (\Config::has('elasticquent.config')) {
$config = \Config::get('elasticquent.config');
if (config()->has('elasticquent.config')) {
$config = config()->get('elasticquent.config');
}

return new \Elasticsearch\Client($config);
Expand All @@ -85,8 +85,8 @@ public function getIndexName()
// The first thing we check is if there
// is an elasticquery config file and if there is a
// default index.
if (\Config::has('elasticquent.default_index')) {
return \Config::get('elasticquent.default_index');
if (config()->has('elasticquent.default_index')) {
return config()->get('elasticquent.default_index');
}

// Otherwise we will just go with 'default'
Expand Down

0 comments on commit d2ebffb

Please sign in to comment.