From: Vincent Vanwaelscappel Date: Wed, 7 Feb 2024 18:08:10 +0000 (+0100) Subject: wait #6716 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4a0b08fedb848eed70f1ec2dd214b11f57504b88;p=cubist_cms-back.git wait #6716 @0.5 --- diff --git a/src/app/Magic/Traits/CustomDataSource.php b/src/app/Magic/Traits/CustomDataSource.php index 6f6a13b..0a1ea90 100644 --- a/src/app/Magic/Traits/CustomDataSource.php +++ b/src/app/Magic/Traits/CustomDataSource.php @@ -42,6 +42,10 @@ trait CustomDataSource $instance = (new static); + if (method_exists($instance, 'forceDelete')) { + static::withoutGlobalScopes()->onlyTrashed()->forceDelete(); + } + $listAllInDb = static::withoutGlobalScopes()->get(); $pk = $instance->getPrimaryKey(); $existingKeys = [];