Skip to content

Commit 8e2397b

Browse files
fix clearFiles method
delete thumbnail too if found.
1 parent 3f21bd1 commit 8e2397b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/HasFiles.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ public function files()
148148
public function clearFiles()
149149
{
150150
foreach ($this->files()->get() as $file) {
151+
if ($thumb = $file->file->thumbnail)
152+
$thumb->delete();
153+
151154
$file->file->delete();
152155
}
153156
}

0 commit comments

Comments
 (0)