Skip to content

Commit 54241ea

Browse files
chore: Add updateWithoutSyncingToSearch method to HasSearchableName trait
1 parent c1cbd05 commit 54241ea

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
@@ -73,4 +73,11 @@ public function saveWithoutSyncingToSearch(): void
7373
$this->saveQuietly();
7474
});
7575
}
76+
77+
public function updateWithoutSyncingToSearch(array $attributes = [], array $options = []): bool
78+
{
79+
return $this::withoutSyncingToSearch(function () use ($attributes, $options) {
80+
return $this->update($attributes, $options);
81+
});
82+
}
7683
}

0 commit comments

Comments
 (0)