$page->delete()
Deletes the page
$page->delete(bool $force = false): bool
Parameters
Name | Type | Default | Description |
---|---|---|---|
$force |
bool |
false |
Return type
bool
Example
try {
page('blog/old-article')->delete();
echo 'The page has been deleted';
} catch(Exception $e) {
echo $e->getMessage();
}