diff --git a/src/SearchableTrait.php b/src/SearchableTrait.php index 9b17734..a3d52eb 100644 --- a/src/SearchableTrait.php +++ b/src/SearchableTrait.php @@ -33,7 +33,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null) if ( ! $search) { - return $q; + return $query; } $words = explode(' ', $search); @@ -60,7 +60,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null) $this->mergeQueries($query, $q); - return $q; + return $query; } /**