Skip to content

Commit afbb006

Browse files
authored
Merge pull request lazychaser#190 from pittkost/fix-create-method
Refresh node after creating children
2 parents 2bd013f + 6255934 commit afbb006

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/NodeTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,8 @@ public static function create(array $attributes = [], self $parent = null)
778778
$child->setRelation('parent', $instance);
779779
}
780780

781+
$instance->refreshNode();
782+
781783
return $instance->setRelation('children', $relation);
782784
}
783785

0 commit comments

Comments
 (0)