Browse Source

Adding line to remove soft deleted objects from returned results, so it falls in line with using eloquent

master
Jake Boyles 9 years ago
parent
commit
97fdd406e3
  1. 1
      src/SearchDrivers/BaseSearchDriver.php

1
src/SearchDrivers/BaseSearchDriver.php

@ -99,6 +99,7 @@ abstract class BaseSearchDriver implements SearchDriverInterface
{ {
$this->query = \DB::table($this->table) $this->query = \DB::table($this->table)
->select($this->columns) ->select($this->columns)
->where('deleted_at',NULL)
->addSelect($this->buildSelectQuery($this->searchFields)) ->addSelect($this->buildSelectQuery($this->searchFields))
->orderBy($this->relevanceFieldName, 'desc') ->orderBy($this->relevanceFieldName, 'desc')
->having($this->relevanceFieldName, '>', 0); ->having($this->relevanceFieldName, '>', 0);

Loading…
Cancel
Save