Reference

Guide

$collection->toArray()

Converts all objects in the collection to an array. This can also take a callback function to further modify the array result.

$collection->toArray(Closure $map = null): array

Parameters

Name Type Default Description
$map Closure null

Return type

array

Source code

kirby/src/Cms/Collection.php#L327