Collection::take()

Collection take(int $limit) Take the first or last {$limit} items. Parameters int $limit Return Value Collection

Collection::take()

Collection take(int $limit) Take the first or last {$limit} items. Parameters int $limit Return Value Collection

Collection::sum()

mixed sum(callable|string|null $callback = null) Get the sum of the given values. Parameters callable|string|null $callback Return Value mixed

Collection::sum()

mixed sum(callable|string|null $callback = null) Get the sum of the given values. Parameters callable|string|null $callback Return Value mixed

Collection::split()

Collection split(int $numberOfGroups) Split a collection into a certain number of groups. Parameters int $numberOfGroups Return Value Collection

Collection::splice()

Collection splice(int $offset, int|null $length = null, mixed $replacement = array()) Splice a portion of the underlying collection array. Parameters int $offset int|null $length mixed $replacement Return Value Collection

Collection::splice()

Collection splice(int $offset, int|null $length = null, mixed $replacement = array()) Splice a portion of the underlying collection array. Parameters int $offset int|null $length mixed $replacement Return Value Collection

Collection::split()

Collection split(int $numberOfGroups) Split a collection into a certain number of groups. Parameters int $numberOfGroups Return Value Collection

Collection::sortByDesc()

Collection sortByDesc(callable|string $callback, int $options = SORT_REGULAR) Sort the collection in descending order using the given callback. Parameters callable|string $callback int $options Return Value Collection

Collection::sortBy()

Collection sortBy(callable|string $callback, int $options = SORT_REGULAR, bool $descending = false) Sort the collection using the given callback. Parameters callable|string $callback int $options bool $descending Return Value Collection