Skip to content

Commit 377141f

Browse files
committed
fix: eager loading of page grandparent
1 parent 90e27f7 commit 377141f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Routes/PageRouteHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public function getUrl(Page $page, ?string $locale = null): string
1515
return route(static::ROUTE_HOME);
1616
}
1717

18+
$page->load('parent.parent');
19+
1820
if ($page->parent && $page->parent->parent) {
1921
return route(static::ROUTE_GRANDCHILD_PAGE, [
2022
'grandparent' => $page->parent->parent,

0 commit comments

Comments
 (0)