Skip to content

Commit

Permalink
chore: Add updateWithoutSyncingToSearch method to HasSearchableName t…
Browse files Browse the repository at this point in the history
…rait
  • Loading branch information
ewilan-riviere committed Jun 11, 2024
1 parent c1cbd05 commit 54241ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Traits/HasSearchableName.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,11 @@ public function saveWithoutSyncingToSearch(): void
$this->saveQuietly();
});
}

public function updateWithoutSyncingToSearch(array $attributes = [], array $options = []): bool
{
return $this::withoutSyncingToSearch(function () use ($attributes, $options) {
return $this->update($attributes, $options);
});
}
}

0 comments on commit 54241ea

Please sign in to comment.