Is there anyway to just reverse this code from exists()
to notExists or something? Did not find anything in the docs.
<?php
// To show pages that are not translated
pages::$methods['notTranslated'] = function($pages) {
return $pages->filter(function($page) {
return $page->content(site()->language()->code())->exists();
});
};
?>