spatie/laravel-collection-macros
A set of useful Laravel collection macros
8.1.0
6.8M downloads/mo
#1528 most downloaded on Packagist
spatie/laravel-collection-macros
What this package is like to depend on
Last release 6 months ago
20 Feb 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 76 of 82 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
82 releases · first in 2016
2 releases in the last 12 months
see the full history below
Release timeline
81 releases · Jul 2016 to Feb 2026Releases
latest 60 of 82-
8.1.020 Feb 2026 -
8.0.228 Nov 2025Release notes
Open source →What's Changed
- Update README.md by @pikant in #254
- Update issue template by @AlexVanderbist in #255
New Contributors
Full Changelog: 8.0.1...8.0.2
Release notes
Open source →What's Changed
- Update README.md by @pikant in https://github.com/spatie/laravel-collection-macros/pull/254
- Update issue template by @AlexVanderbist in https://github.com/spatie/laravel-collection-macros/pull/255
New Contributors
- @pikant made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/254
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/8.0.1...8.0.2
-
8.0.118 Aug 2025Release notes
Open source →What's Changed
- Delete
firstOrFail()macro by @jivanf in https://github.com/spatie/laravel-collection-macros/pull/253
New Contributors
- @jivanf made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/253
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/8.0.0...8.0.1
- Delete
-
8.0.017 Feb 2025Release notes
Open source →Release notes
Open source →What's Changed
- Laravel 12.x Compatibility by @laravel-shift in https://github.com/spatie/laravel-collection-macros/pull/252
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.2...8.0.0
-
7.14.211 Dec 2024Release notes
Open source →What's Changed
- fix: php 8.4 compatibility by @calebdw in https://github.com/spatie/laravel-collection-macros/pull/251
New Contributors
- @calebdw made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/251
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.1...7.14.2
-
7.14.102 Jul 2024Release notes
Open source →Release notes
Open source →What's Changed
- pluckMany dotted key support by @sfinktah in https://github.com/spatie/laravel-collection-macros/pull/248
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.0...7.14.1
-
7.14.008 Mar 2024Release notes
Open source →What's Changed
- Laravel 11.x Compatibility by @laravel-shift in #249
New Contributors
- @laravel-shift made their first contribution in #249
Full Changelog: 7.13.1...7.14.0
Release notes
Open source →What's Changed
- Laravel 11.x Compatibility by @laravel-shift in https://github.com/spatie/laravel-collection-macros/pull/249
New Contributors
- @laravel-shift made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/249
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.1...7.14.0
-
7.13.117 Oct 2023Release notes
Open source →What's Changed
- feat(collectBy): support dot-notation by @innocenzi in #247
New Contributors
- @innocenzi made their first contribution in #247
Full Changelog: 7.13.0...7.13.1
Release notes
Open source →What's Changed
- feat(collectBy): support dot-notation by @innocenzi in https://github.com/spatie/laravel-collection-macros/pull/247
New Contributors
- @innocenzi made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/247
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.0...7.13.1
-
7.13.030 Jun 2023Release notes
Open source →- add
hasCaseSensitiveandgetCaseSensitive - drop support for older PHP and Laravel versions
- refactor tests to Pest
Release notes
Open source →- add
hasCaseSensitiveandgetCaseSensitive - drop support for older PHP and Laravel versions
- refactor tests to Pest
- add
-
7.12.511 May 2023Release notes
Open source →What's Changed
- Sfink pluck many values by @sfinktah in https://github.com/spatie/laravel-collection-macros/pull/242
New Contributors
- @sfinktah made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/242
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.4...7.12.5
-
7.12.422 Mar 2023Release notes
Open source →What's Changed
- Add max depth parameter for recursive macro by @Kyzegs in https://github.com/spatie/laravel-collection-macros/pull/240
New Contributors
- @Kyzegs made their first contribution 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
-
7.12.324 Jan 2023 -
7.12.210 Nov 2022Release notes
Open source →What's Changed
- Fix warnings on running the test suite by @alexmanase in https://github.com/spatie/laravel-collection-macros/pull/238
New Contributors
- @alexmanase made their first contribution 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
-
7.12.103 Oct 2022Release notes
Open source →What's Changed
- Update containsAll description by @NilLlisterri in https://github.com/spatie/laravel-collection-macros/pull/233
New Contributors
- @NilLlisterri made their first contribution 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
-
7.12.005 Aug 2022Release notes
Open source →What's Changed
- Update .gitattributes by @angeljqv in https://github.com/spatie/laravel-collection-macros/pull/231
- Added
containsAnyandcontainsAllby @freekmurze and @michaelnabil230
New Contributors
- @angeljqv made their first contribution in https://github.com/spatie/laravel-collection-macros/pull/231
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.11.0...7.12.0
-
7.11.018 Mar 2022Nothing published for this version
-
7.10.013 Jan 2022 -
7.9.022 Nov 2021Nothing published for this version
-
7.8.015 Nov 2021Nothing published for this version
-
7.7.024 Oct 2021 -
7.6.015 Oct 2021Release notes
Open source →- Fix docblock indentation by @dwightwatson in https://github.com/spatie/laravel-collection-macros/pull/211
- Add before and after macros by @shugyosha89 in https://github.com/spatie/laravel-collection-macros/pull/213
- Using slice to get the nth element by @mateusjunges in https://github.com/spatie/laravel-collection-macros/pull/214
-
7.5.006 Oct 2021 -
7.4.007 Sep 2021 -
7.3.015 Jul 2021 -
7.2.008 May 2021 -
7.1.002 Dec 2020 -
7.0.308 Sep 2020 -
7.0.203 Jul 2020 -
7.0.111 Jun 2020 -
7.0.011 Jun 2020 -
6.3.110 Jun 2021 -
6.3.010 Jun 2021 -
6.1.003 Mar 2020 -
6.0.004 Sep 2019Release notes
Open source →- Laravel 6 support
- Renamed
collect()macro tocollectBy()to resolve Laravel 6 compatibility
-
5.0.219 Mar 2019Release notes
Open source →- require laravel 5.8.4
- remove
joinmethod as the same implementation has been added to Laravel
-
5.0.107 Mar 2019 -
5.0.027 Feb 2019Release notes
Open source →prioritizewill keep the keys of the original item- drop support for Laravel 5.7 and below
- drop support for PHP 7.1 and below
-
4.3.227 Feb 2019 -
4.3.127 Feb 2019 -
4.3.025 Feb 2019 -
4.2.016 Dec 2018 -
4.1.029 Nov 2018 -
4.0.119 Oct 2018 -
4.0.027 Aug 2018Release notes
Open source →firstOrFailwill return the item instead of a collection- support for Laravel 5.7
- removed
rangemacro
-
3.8.123 Feb 2018 -
3.8.008 Feb 2018 -
3.7.018 Jan 2018 -
3.6.214 Jan 2018 -
3.6.107 Jan 2018 -
3.6.018 Dec 2017 -
3.5.018 Dec 2017 -
3.4.013 Nov 2017 -
3.3.230 Oct 2017Release notes
Open source →- Fixed:
transposewhen using an empty array - Fixed:
transposewhen using anArrayable
- Fixed:
-
3.3.124 Oct 2017 -
3.3.017 Oct 2017 -
3.2.011 Oct 2017 -
3.1.028 Sep 2017 -
3.0.030 Aug 2017Release notes
Open source →- Added: support for Laravel 5.5, removed support for older versions
- Added:
globmacro - Removed:
ddanddumpmacros - Changed: Parameter order for
groupByModelandsectionBy
-
2.7.129 Aug 2017Nothing published for this version
-
2.7.025 Aug 2017