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(); } }