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

Commit 6454655

Browse files
authored
Check if the model its using soft deletes to enable soft deletes
Add an extra check to see if the query builder should use soft deletes, checking only for the config value lead to unexpected behaviour
1 parent be363a6 commit 6454655

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)