$page->duplicate()
Duplicates the page with the given slug and optionally copies all files
Parameters
Name | Type | Default |
---|---|---|
$slug | string |null |
null |
$options | array |
[ ] |
Return type
This method does not modify the existing $page
object but returns a new object with the changes applied. Learn more →
Parent class
The $options
parameter
Name | Type |
---|---|
title |
string |
children |
bool |
files |
bool |
Example
Duplicates are always created as draft pages.