Skip to content

Commit

Permalink
Add saveQuietly to LocalizedTerm
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuablum committed Jan 8, 2024
1 parent a9e51c8 commit 9ddf697
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Taxonomies/LocalizedTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class LocalizedTerm implements Arrayable, ArrayAccess, Augmentable, ContainsQuer

protected $locale;
protected $term;
protected $withEvents = true;

public function __construct($term, $locale)
{
Expand Down Expand Up @@ -416,6 +417,13 @@ public function newAugmentedInstance(): Augmented
// ])->all();
// }

public function saveQuietly()
{
$this->withEvents = false;

return $this->save();
}

public function save()
{
return $this->term->save();
Expand Down

0 comments on commit 9ddf697

Please sign in to comment.