$page->delete($force = false)

Deletes the $page object and all its data and files. This cannot be undone!

  • $force (boolean)
    If set to `true` the page is deleted even if there are subpages
  • return (boolean)

Example

try {

  page('blog/old-article')->delete();
  echo 'The page has been deleted';

} catch(Exception $e) {

  echo $e->getMessage();

}

Is something missing or incorrect? Edit this page on Github…