deleting attachments when master / sub task is deleted

This commit is contained in:
StudioTem committed 2023-02-14 09:15:04 +01:00
1 parent 17ed7616ee
commit f35cd29071
4 files changed
+59 -3

No files matched your search

+8
View File
@@ -47,4 +47,12 @@ class Attachment extends Model
return $attachmentDataArray;
}
public function deleteFromS3()
{
$path = 'jandl_taskmanager/attachments/' . $this->master_task_id . '/' . $this->disk_name;
Storage::disk('s3')->delete($path);
return true;
}
}