We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d8f540 commit 4bda80bCopy full SHA for 4bda80b
src/Actions/Bulk/DeleteThreads.php
@@ -3,9 +3,12 @@
3
namespace TeamTeaTime\Forum\Actions\Bulk;
4
5
use Illuminate\Support\Facades\DB;
6
-use TeamTeaTime\Forum\Actions\BaseAction;
7
-use TeamTeaTime\Forum\Models\BaseModel;
8
-use TeamTeaTime\Forum\Models\Thread;
+use TeamTeaTime\Forum\{
+ Actions\BaseAction,
+ Models\BaseModel,
9
+ Models\Post,
10
+ Models\Thread,
11
+};
12
13
class DeleteThreads extends BaseAction
14
{
@@ -83,6 +86,10 @@ protected function transact()
83
86
$category->update($updates);
84
87
}
85
88
89
+ if ($this->permaDelete) {
90
+ Post::whereIn('thread_id', $this->threadIds)->withTrashed()->forceDelete();
91
+ }
92
+
93
return $threads;
94
95
0 commit comments