Reverse if language exists


#1

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();
  });
};
?>

#2

return $page->content(site()->language()->code())->exists() === false;


#3

That worked well. Thank you! :smiley: