From 48d60b97a257c616703f9155ba1482846a0ec3d8 Mon Sep 17 00:00:00 2001 From: Peter Elmered Date: Tue, 6 Feb 2024 14:27:03 +0100 Subject: [PATCH] Support for morph maps --- src/Models/Traits/HasFilamentComments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Traits/HasFilamentComments.php b/src/Models/Traits/HasFilamentComments.php index 4c53929..aa2af2a 100644 --- a/src/Models/Traits/HasFilamentComments.php +++ b/src/Models/Traits/HasFilamentComments.php @@ -11,7 +11,7 @@ public function filamentComments(): HasMany { return $this ->hasMany(FilamentComment::class, 'subject_id') - ->where('subject_type', static::class) + ->where('subject_type', $this->getMorphClass()) ->latest(); } }