Best practice for collection of unlisted pages and drafts

Is there a best practice to setup a collection with drafts and unlisted, but not listed pages of page(‘xy’)?

<?php

return function () {
    $page = page('messages');
    $drafts = $page->drafts();
    $unlisted= $page->children()->unlisted();
    $pages = $drafts->merge($unlisted);

    // do some filter stuff

    return $pagesFiltered;
};

Thx!

Don’t know about best practice, but what I would do:

$draftsAndUnlisted = page('messages')->childrenAndDrafts()->unlisted();
2 Likes

that is definitely better.
thx :pray: