Skip to content

Commit

Permalink
get only published subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Feb 23, 2022
1 parent 7156071 commit eaf6309
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public function getSubMenu(): NestableCollection
}

$nestedCollection = $this->whereUriIsNot($uri)
->published()
->orderBy('position', 'asc')
->whereUriIsLike($uri.'%')
->get()
Expand Down

0 comments on commit eaf6309

Please sign in to comment.