src/Mosaiqo/OptimusPrime/Transformer.php
public function transformCollection($collection)
	{
		if(is_object($collection))
			$collection = $collection->toArray()["data"];

		return array_map([$this , "transform"], $collection);
	}
public function transformCollection($collection)
	{
		if(is_object($collection))
			$collection = $collection->toArray()["data"];

		return array_map([$this , "transform"], $collection);
	}
Iterates whether a collection or an
array to the transform method.

@param array|collection $collection
@return array