mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Code for #3546
This commit is contained in:
@@ -358,4 +358,16 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
return $this->user->ruleGroups()->where('title', $title)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function destroyAll(): void
|
||||
{
|
||||
$groups = $this->get();
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
$group->rules()->delete();
|
||||
$group->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user