Laravel Collection Public API: each
The each method in Laravel's Collection class allows you to perform a $callback on each item in the collection. If the $callback function returns false, the loop will break. This method is similar to PHP's foreach construct. Even though the each method does not explicitly allow modifications to a collection's items, it is still possible to modify object properties within...