Skip to content

Commit 377f0bd

Browse files
committed
relation
1 parent 66fd660 commit 377f0bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/Models/Traits/RelateToComment.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ trait RelateToComment {
1212
public function getCommentId (): ?int {
1313
return $this->commentId;
1414
}
15+
public function relation($parent=null):void{
16+
parent::relation($parent);
17+
$this->commentId = $parent->commentId ?? $parent->id ?? null;
18+
}
19+
1520
}

0 commit comments

Comments
 (0)