diff --git a/src/Console/Kernel.php b/src/Console/Kernel.php index d65041b..12f7d0d 100644 --- a/src/Console/Kernel.php +++ b/src/Console/Kernel.php @@ -17,9 +17,9 @@ protected function schedule(Schedule $schedule) $date = new \DateTime(); $models = Destructor::whereDate('ttl', '<=', $date->format('Y-m-d'))->whereTime('ttl', '<=', $date->format('H:i:s'))->get(); foreach($models as $model) { - $model->deletable_type::find($model->deletable_id)->delete(); + $model->deletable_type::withTrashed()->find($model->deletable_id)->delete(); $model->delete(); } })->everyMinute(); } -} \ No newline at end of file +}