Skip to content

Commit 521035b

Browse files
Refactor HasSearchableName trait to include a new method saveWithoutSyncingToSearch()
1 parent 3b16bec commit 521035b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Traits/HasSearchableName.php

+7
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,11 @@ public static function searchAsSearchable(string $search, bool $asObject = true)
6666

6767
return $results;
6868
}
69+
70+
public function saveWithoutSyncingToSearch(): void
71+
{
72+
$this::withoutSyncingToSearch(function () {
73+
$this->saveQuietly();
74+
});
75+
}
6976
}

0 commit comments

Comments
 (0)