Skip to content

Commit

Permalink
allow deleting media after records bulk destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 authored and ifox committed May 24, 2024
1 parent 5241d8e commit 57e9eb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Repositories/ModuleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,8 @@ public function bulkForceDelete(array $ids): bool
$query = $this->model->onlyTrashed()->whereIn('id', $ids);
$objects = $query->get();

$query->forceDelete();

$objects->each(function ($object) {
$object->forceDelete();
$this->afterDelete($object);
});
} catch (Exception $exception) {
Expand Down

0 comments on commit 57e9eb2

Please sign in to comment.