Skip to content

Commit

Permalink
Update HasParent.php
Browse files Browse the repository at this point in the history
  • Loading branch information
adamthehutt authored Nov 19, 2024
1 parent 875ebf1 commit 088abcc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/HasParent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 088abcc

Please sign in to comment.