diff --git a/src/HasChildren.php b/src/HasChildren.php index aa5c31e..4fb1726 100644 --- a/src/HasChildren.php +++ b/src/HasChildren.php @@ -245,6 +245,16 @@ public function getChildTypes(): array return []; } + /** + * Create a child model from the current instance. + * + * @return static + */ + public function toChildModel(): self + { + return $this->newInstance($this->getAttributes(), $this->exists); + } + /** * @return mixed */