Laravel 13.19 introduces Collection::reduceInto().

It's built for cases where you're mutating a single accumulator, instead of returning it on every iteration with reduce().

A small API, but a cleaner mental model for building DTOs, summaries, and other mutable objects.
image

23

  • No matching results...
  • Searching...

/ 1000