NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1448 most downloaded on Packagist
A set of useful Laravel collection macros
Last release 7 months ago
20 Feb 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 56 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
82 releases · first in 2016
Add Laravel 13 support
Add Laravel 13 support
Update README.md by @pikant in #254
Full Changelog: 8.0.1...8.0.2
One column per quarter.
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/8.0.1...8.0.2
Delete firstOrFail() macro by @jivanf in #253
firstOrFail() macro by @jivanf in https://github.com/spatie/laravel-collection-macros/pull/253Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/8.0.0...8.0.1
Laravel 12.x Compatibility by @laravel-shift in #252
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.2...8.0.0
fix: php 8.4 compatibility by @calebdw in #251
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.1...7.14.2
pluckMany dotted key support by @sfinktah in #248
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.0...7.14.1
Laravel 11.x Compatibility by @laravel-shift in #249
Full Changelog: 7.13.1...7.14.0
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.1...7.14.0
feat(collectBy): support dot-notation by @innocenzi in #247
Full Changelog: 7.13.0...7.13.1
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.0...7.13.1
add hasCaseSensitive and getCaseSensitive
hasCaseSensitive and getCaseSensitiveSfink pluck many values by @sfinktah in #242
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.4...7.12.5
Add max depth parameter for recursive macro by @Kyzegs in https://github.com/spatie/laravel-collection-macros/pull/240
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.3...7.12.4
- support L10
Fix warnings on running the test suite by @alexmanase in https://github.com/spatie/laravel-collection-macros/pull/238
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.1...7.12.2
Update containsAll description by @NilLlisterri in https://github.com/spatie/laravel-collection-macros/pull/233
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.0...7.12.1
Update .gitattributes by @angeljqv in https://github.com/spatie/laravel-collection-macros/pull/231
containsAny and containsAll by @freekmurze and @michaelnabil230Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.11.0...7.12.0
Nothing published for this version
- support Laravel 9
Nothing published for this version
Nothing published for this version
- add if macro
if macroFix docblock indentation by @dwightwatson in https://github.com/spatie/laravel-collection-macros/pull/211
- add insertAt macro
insertAt macro (#209)- add pluckMany
pluckMany (#207)- add firstOrPush
firstOrPush- add getNth macro
- add support for PHP 8
- add support for Laravel 8
improve second, third, ... marcros
use registry over file scan + string manipulation
drop support for PHP 7.3 and below
- add PHP 8 support
DO NOT USE: incorrectly tagged - add PHP 8 support
DO NOT USE: incorrectly tagged
- Laravel 7 support
Renamed collect() macro to collectBy() to resolve Laravel 6 compatibility
collect() macro to collectBy() to resolve Laravel 6 compatibilityremove join method as the same implementation has been added to Laravel
join method as the same implementation has been added to Laravelfix paginate for pages other than 1
paginate for pages other than 1prioritize will keep the keys of the original item
prioritize will keep the keys of the original itemfix paginate for pages other than 1
paginate for pages other than 1- add support for Laravel 5.8
- add join macro
join macro- add head macro
head macroadd methods to get items by human named indexes
- parallels macro tests fix
parallels macro tests fixfirstOrFail will return the item instead of a collection
firstOrFail will return the item instead of a collectionrange macroFixed: maximum function nesting reached error in eachCons
eachConsAdded: Laravel 5.6 compatibility
- Added: pluckToArray
pluckToArrayFixed: Make parallelMap return a new collection
parallelMap return a new collectionFixed: Count warning/exception php7.2 in Transpose
TransposeAdded: Allow worker pool of parallelMap to be configured
parallelMap to be configured- Added: parallelMap
parallelMap- Added: findOrFail
findOrFailFixed: transpose when using an empty array
transpose when using an empty arraytranspose when using an ArrayableFixed: transpose when using a single-row matrix
transpose when using a single-row matrix- Added: at
at- Added: rotate
rotate- Added: filterMap
filterMapAdded: support for Laravel 5.5, removed support for older versions
glob macrodd and dump macrosgroupByModel and sectionByNothing published for this version
Added: $itemsKey and $preserveKeys parameters to groupByModel
$itemsKey and $preserveKeys parameters to groupByModelYour coding agent can read these notes before it upgrades. Set up the MCP server →