src/Collection.php
public function each(callable $callable)
    {
        foreach ($this->items as $key => $item) {
            if ($callable($item, $key) === false) {
                break;
            }
            $this->items[$key] = $item;
        }
        return $this;
    }
public function each(callable $callable)
    {
        foreach ($this->items as $key => $item) {
            if ($callable($item, $key) === false) {
                break;
            }
            $this->items[$key] = $item;
        }
        return $this;
    }
Run a callable/closure on each element.

@param callable $callable Parameters: ($item, $key). Prefix $item with & to modify $item.
@return $this
@throws \Exception