Update Backup.php

This commit is contained in:
Bozhidar 2024-05-10 16:01:44 +03:00
parent bd53013d4b
commit bc322f7084

View file

@ -52,13 +52,8 @@ class Backup extends Model
});
static::deleting(function ($model) {
if (is_file($model->filepath)) {
// ShellApi::safeDelete($model->path, [
// Storage::path('backups')
// ]);
// if (Storage::disk('backups')->exists($model->filepath)) {
// Storage::disk('backups')->delete($model->filepath);
// }
if (is_file($model->file_path)) {
shell_exec('rm -rf ' . $model->file_path);
}
});
}