From 47b6e36fe5b861a6528f85f352b20a8678e959ab Mon Sep 17 00:00:00 2001 From: Lee Pownall <83426233+LeeJump24@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:49:28 +0000 Subject: [PATCH] Use Model set in config Use the Model defined in the config --- src/Livewire/CommentsComponent.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Livewire/CommentsComponent.php b/src/Livewire/CommentsComponent.php index 021999d..88037ef 100644 --- a/src/Livewire/CommentsComponent.php +++ b/src/Livewire/CommentsComponent.php @@ -10,7 +10,6 @@ use Illuminate\Contracts\View\View; use Illuminate\Database\Eloquent\Model; use Livewire\Component; -use Parallax\FilamentComments\Models\FilamentComment; class CommentsComponent extends Component implements HasForms { @@ -79,7 +78,7 @@ public function create(): void public function delete(int $id): void { - $comment = FilamentComment::find($id); + $comment = app(config('filament-comments.comment_model'))::find($id); if (!$comment) { return;