Skip to content

Commit

Permalink
Merge pull request #52 from JulienTant/patch-1
Browse files Browse the repository at this point in the history
return $q to make laravel's count() work
  • Loading branch information
nicolaslopezj committed May 12, 2015
2 parents 9367f52 + e04732c commit 0f6fe9f
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
Expand Up @@ -33,7 +33,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null)

if ( ! $search)
{
return $query;
return $q;
}

$search = strtolower($search);
Expand Down Expand Up @@ -61,7 +61,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null)

$this->mergeQueries($query, $q);

return $query;
return $q;
}

/**
Expand Down

0 comments on commit 0f6fe9f

Please sign in to comment.