diff --git a/src/HasParent.php b/src/HasParent.php index 10051d4..4ec4496 100644 --- a/src/HasParent.php +++ b/src/HasParent.php @@ -41,8 +41,11 @@ public static function bootHasParent(): void } }); - $parentObservedBy = (new static)->getParentClass()::resolveObserveAttributes(); - static::observe($parentObservedBy); + + if (method_exists(static::class, 'resolveObserveAttributes')) { + $parentObservedBy = (new static)->getParentClass()::resolveObserveAttributes(); + static::observe($parentObservedBy); + } } public function parentHasHasChildrenTrait(): bool