$pages->append($key, $object)
Appends an element to the data array
-
$key (string)
-
$object (mixed)
-
return (collection)
Example
<?php
$collection = page('projects')->children()->limit(1);
foreach(page('projects')->children()->offset(1) as $key => $child) {
$collection->append($key, $child);
}
foreach($collection as $item) {
echo $item->title() ;
}
?>