Skip to content

Commit

Permalink
add alias method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 13, 2021
1 parent 6442130 commit a01e9ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Illuminate/Collections/Traits/EnumeratesValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,20 @@ class_basename(static::class), gettype($result)
return $result;
}

/**
* Reduce the collection to multiple aggregate values.
*
* @param callable $callback
* @param mixed ...$initial
* @return array
*
* @throws \UnexpectedValueException
*/
public function reduceSpread(callable $callback, ...$initial)
{
return $this->reduceMany($callback, ...$initial);
}

/**
* Reduce an associative collection to a single value.
*
Expand Down

0 comments on commit a01e9ed

Please sign in to comment.