From 0181ff9d96a599f494e2462457b98d107c91296c Mon Sep 17 00:00:00 2001 From: cengiz Date: Wed, 26 Aug 2020 08:48:58 +0300 Subject: [PATCH] fix Collection.php linkNodes function use getParentId instead of parent_id and check if it is null --- src/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Collection.php b/src/Collection.php index be592a8..a592ee2 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -21,7 +21,7 @@ public function linkNodes() /** @var Node $node */ foreach ($this->items as $node) { - if (! $node->parent_id) { + if (is_null($node->getParentId())) { $node->setRelation('parent', null); }