From 6a244cfe1eb0aaac045deb8ed3c11a1876ca9711 Mon Sep 17 00:00:00 2001 From: Jarno van Leeuwen Date: Wed, 5 Aug 2015 15:09:02 +0200 Subject: [PATCH] Use the model's connection to determine database driver. --- src/SearchableTrait.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SearchableTrait.php b/src/SearchableTrait.php index e013ecf..69f94a3 100644 --- a/src/SearchableTrait.php +++ b/src/SearchableTrait.php @@ -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'); } /**