Skip to content

Commit

Permalink
Merge pull request #38 from daack/master
Browse files Browse the repository at this point in the history
Fix scopeSearch, it returned the cloned query $q instead of new $query
  • Loading branch information
nicolaslopezj committed Apr 14, 2015
2 parents f4d3bc5 + 062d660 commit d5b7e65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SearchableTrait.php
Original file line number Diff line number Diff line change
@@ -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;
}

/**

0 comments on commit d5b7e65

Please sign in to comment.