Skip to content

Commit

Permalink
clearMetas method added to allow delete all meta attributes at once
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoletto committed Dec 30, 2020
1 parent 930121e commit 1d42ca3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Concerns/HasMetaAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,14 @@ public function forgetMeta(string $key): void
{
$this->metas()->where('key', $key)->delete();
}

/**
* Delete all meta attributes
*
* @return void
*/
public function clearMetas(): void
{
$this->metas()->delete();
}
}

0 comments on commit 1d42ca3

Please sign in to comment.