Code cleanup to use new findCountWhere function
This commit is contained in:
parent
c1a078bdcf
commit
4da7922de6
4 changed files with 9 additions and 10 deletions
|
@ -141,13 +141,11 @@ class DeletionService
|
|||
}
|
||||
|
||||
$this->database->beginTransaction();
|
||||
|
||||
$this->databaseRepository->withColumns('id')->findWhere([['server_id', '=', $server->id]])->each(function ($item) {
|
||||
$this->databaseManagementService->delete($item->id);
|
||||
});
|
||||
|
||||
$this->repository->delete($server->id);
|
||||
|
||||
$this->database->commit();
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue