Laravel Collection Public API: transform
transform(callable $callback) The transform is identical to the map method, but instead of returning a new Collection instance, the transform method will modify the original collection instance. The transform method will return a reference to the...