Skip to content

Commit

Permalink
Merge pull request #70 from jarnovanleeuwen/master
Browse files Browse the repository at this point in the history
Use the model's connection to determine database driver.
  • Loading branch information
nicolaslopezj committed Aug 5, 2015
2 parents d5529d5 + 6a244cf commit 39dcf98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SearchableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null, $entireText
* @return array
*/
protected function getDatabaseDriver() {
$key = Config::get('database.default');
return Config::get('database.connections.' . $key . '.driver');
return Config::get('database.connections.' . $this->connection . '.driver');
}

/**
Expand Down

0 comments on commit 39dcf98

Please sign in to comment.