$pages->merge()
Include all given items in the collection
$pages->merge($args = null): Kirby\Cms\Pages
Parameters
Name | Type | Default | Description |
---|---|---|---|
$args |
mixed |
null |
Return type
Example:
<?php
$collection1 = page('exhibitions')->children()->listed();
$collection2 = page('news')->children()->listed());
$newCollection = $collection1->merge($collection2);
?>