Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit ab0d0b1

Browse files
authored
Merge pull request #137 from nerones/master
Check if the model its using soft deletes to enable soft deletes in the query builder
2 parents be363a6 + 6454655 commit ab0d0b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Searchable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getSearchRules()
8888
*/
8989
public static function search($query, $callback = null)
9090
{
91-
$softDelete = config('scout.soft_delete', false);
91+
$softDelete = $this->usesSoftDelete() && config('scout.soft_delete', false);
9292

9393
if ($query == '*') {
9494
return new FilterBuilder(new static, $callback, $softDelete);

0 commit comments

Comments
 (0)