PackageTrack
Sign in Get early access

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 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 82
  1. 8.1.0 20 Feb 2026
    Release notes

    Add Laravel 13 support

    Open source →
  2. 8.0.2 28 Nov 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 8.0.1...8.0.2

    Open source →
    Release notes

    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

    Open source →
  3. 8.0.1 18 Aug 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 8.0.0...8.0.1

    Open source →
    Release notes

    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

    Open source →
  4. 8.0.0 17 Feb 2025
    Release notes

    What's Changed

    Full Changelog: 7.14.2...8.0.0

    Open source →
    Release notes

    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

    Open source →
  5. 7.14.2 11 Dec 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 7.14.1...7.14.2

    Open source →
    Release notes

    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

    Open source →
  6. 7.14.1 02 Jul 2024
    Release notes

    What's Changed

    Full Changelog: 7.14.0...7.14.1

    Open source →
    Release notes

    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

    Open source →
  7. 7.14.0 08 Mar 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 7.13.1...7.14.0

    Open source →
    Release notes

    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

    Open source →
  8. 7.13.1 17 Oct 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 7.13.0...7.13.1

    Open source →
    Release notes

    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

    Open source →
  9. 7.13.0 30 Jun 2023
    Release notes
    • add hasCaseSensitive and getCaseSensitive
    • drop support for older PHP and Laravel versions
    • refactor tests to Pest
    Open source →
    Release notes
    • add hasCaseSensitive and getCaseSensitive
    • drop support for older PHP and Laravel versions
    • refactor tests to Pest
    Open source →
  10. 7.12.5 11 May 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 7.12.4...7.12.5

    Open source →
    Release notes

    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

    Open source →
  11. 7.12.4 22 Mar 2023
    Release notes

    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

    Open source →
  12. 7.12.3 24 Jan 2023
    Release notes
    • support L10
    Open source →
  13. 7.12.2 10 Nov 2022
    Release notes

    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

    Open source →
  14. 7.12.1 03 Oct 2022
    Release notes

    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

    Open source →
  15. 7.12.0 05 Aug 2022
    Release notes

    What's Changed

    • Update .gitattributes by @angeljqv in https://github.com/spatie/laravel-collection-macros/pull/231
    • Added containsAny and containsAll by @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

    Open source →
  16. 7.11.0 18 Mar 2022

    Nothing published for this version

  17. 7.10.0 13 Jan 2022
    Release notes
    • support Laravel 9
    Open source →
  18. 7.9.0 22 Nov 2021

    Nothing published for this version

  19. 7.8.0 15 Nov 2021

    Nothing published for this version

  20. 7.7.0 24 Oct 2021
    Release notes
    • add if macro
    Open source →
  21. 7.6.0 15 Oct 2021
    Release notes
    • 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
    Open source →
  22. 7.5.0 06 Oct 2021
    Release notes
    • add insertAt macro (#209)
    Open source →
  23. 7.4.0 07 Sep 2021
    Release notes
    • add pluckMany (#207)
    Open source →
  24. 7.3.0 15 Jul 2021
    Release notes
    • add firstOrPush
    Open source →
  25. 7.2.0 08 May 2021
    Release notes
    • add getNth macro (#201)
    Open source →
  26. 7.1.0 02 Dec 2020
    Release notes
    • add support for PHP 8
    Open source →
  27. 7.0.3 08 Sep 2020
    Release notes
    • add support for Laravel 8
    Open source →
  28. 7.0.2 03 Jul 2020
    Release notes
    • improve second, third, ... marcros
    Open source →
  29. 7.0.1 11 Jun 2020
    Release notes
    • use registry over file scan + string manipulation (#179)
    Open source →
  30. 7.0.0 11 Jun 2020
    Release notes
    • drop support for Laravel 6
    • drop support for PHP 7.3 and below
    Open source →
  31. 6.3.1 10 Jun 2021
    Release notes
    • add PHP 8 support
    Open source →
  32. 6.3.0 10 Jun 2021
    Release notes

    DO NOT USE: incorrectly tagged

    • add PHP 8 support
    Open source →
  33. 6.1.0 03 Mar 2020
    Release notes
    • Laravel 7 support
    Open source →
  34. 6.0.0 04 Sep 2019
    Release notes
    • Laravel 6 support
    • Renamed collect() macro to collectBy() to resolve Laravel 6 compatibility
    Open source →
  35. 5.0.2 19 Mar 2019
    Release notes
    • require laravel 5.8.4
    • remove join method as the same implementation has been added to Laravel
    Open source →
  36. 5.0.1 07 Mar 2019
    Release notes
    • fix paginate for pages other than 1
    Open source →
  37. 5.0.0 27 Feb 2019
    Release notes
    • prioritize will keep the keys of the original item
    • drop support for Laravel 5.7 and below
    • drop support for PHP 7.1 and below
    Open source →
  38. 4.3.2 27 Feb 2019
    Release notes
    • fix paginate for pages other than 1
    Open source →
  39. 4.3.1 27 Feb 2019
    Release notes
    • add support for Laravel 5.8
    Open source →
  40. 4.3.0 25 Feb 2019
    Release notes
    • add join macro
    Open source →
  41. 4.2.0 16 Dec 2018
    Release notes
    • add head macro
    Open source →
  42. 4.1.0 29 Nov 2018
    Release notes
    • add methods to get items by human named indexes
    Open source →
  43. 4.0.1 19 Oct 2018
    Release notes
    • parallels macro tests fix
    Open source →
  44. 4.0.0 27 Aug 2018
    Release notes
    • firstOrFail will return the item instead of a collection
    • support for Laravel 5.7
    • removed range macro
    Open source →
  45. 3.8.1 23 Feb 2018
    Release notes
    • Fixed: maximum function nesting reached error in eachCons
    Open source →
  46. 3.8.0 08 Feb 2018
    Release notes
    • Added: Laravel 5.6 compatibility
    Open source →
  47. 3.7.0 18 Jan 2018
    Release notes
    • Added: pluckToArray
    Open source →
  48. 3.6.2 14 Jan 2018
    Release notes
    • Fixed: Make parallelMap return a new collection
    Open source →
  49. 3.6.1 07 Jan 2018
    Release notes
    • Fixed: Count warning/exception php7.2 in Transpose
    Open source →
  50. 3.6.0 18 Dec 2017
    Release notes
    • Added: Allow worker pool of parallelMap to be configured
    Open source →
  51. 3.5.0 18 Dec 2017
    Release notes
    • Added: parallelMap
    Open source →
  52. 3.4.0 13 Nov 2017
    Release notes
    • Added: findOrFail
    Open source →
  53. 3.3.2 30 Oct 2017
    Release notes
    • Fixed: transpose when using an empty array
    • Fixed: transpose when using an Arrayable
    Open source →
  54. 3.3.1 24 Oct 2017
    Release notes
    • Fixed: transpose when using a single-row matrix
    Open source →
  55. 3.3.0 17 Oct 2017
    Release notes
    • Added: at
    Open source →
  56. 3.2.0 11 Oct 2017
    Release notes
    • Added: rotate
    Open source →
  57. 3.1.0 28 Sep 2017
    Release notes
    • Added: filterMap
    Open source →
  58. 3.0.0 30 Aug 2017
    Release notes
    • Added: support for Laravel 5.5, removed support for older versions
    • Added: glob macro
    • Removed: dd and dump macros
    • Changed: Parameter order for groupByModel and sectionBy
    Open source →
  59. 2.7.1 29 Aug 2017

    Nothing published for this version

  60. 2.7.0 25 Aug 2017
    Release notes
    • Added: $itemsKey and $preserveKeys parameters to groupByModel
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive