mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Code for #3546
This commit is contained in:
@@ -171,4 +171,18 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface
|
||||
{
|
||||
return $objectGroup->piggyBanks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function deleteAll(): void
|
||||
{
|
||||
$all = $this->get();
|
||||
/** @var ObjectGroup $group */
|
||||
foreach ($all as $group) {
|
||||
$group->piggyBanks()->sync([]);
|
||||
$group->bills()->sync([]);
|
||||
$group->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user