From 7e431b3cb81c56575da68ca4cbc3400ba78ed7e4 Mon Sep 17 00:00:00 2001 From: Chris Stebe Date: Sat, 16 Apr 2016 04:55:44 +0200 Subject: [PATCH] fixed createUrl(), no parent name in URL if isRoot() --- models/Tree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Tree.php b/models/Tree.php index 67f571a..9b1f710 100755 --- a/models/Tree.php +++ b/models/Tree.php @@ -296,7 +296,7 @@ public function createUrl($additionalParams = []) 'pageName' => ($this->name) ? Inflector::slug($this->name) : '', - 'parentLeave' => ($this->parents(1)->one()) + 'parentLeave' => ($this->parents(1)->one() && !$this->parents(1)->one()->isRoot()) ? Inflector::slug($this->parents(1)->one()->name) : null, ];