spatie/laravel-collection-macros
Adds a curated set of handy macros to Laravel Collections, extending them with extra helper methods (e.g., positional accessors like second/third, after, getNth, and more). Auto-registers via Composer for quick, drop-in productivity boosts.
Add Laravel 13 support
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/8.0.1...8.0.2
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
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.2...8.0.0
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.1...7.14.2
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.14.0...7.14.1
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.1...7.14.0
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.13.0...7.13.1
hasCaseSensitive and getCaseSensitiveFull Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.4...7.12.5
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.3...7.12.4
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.1...7.12.2
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.12.0...7.12.1
containsAny and containsAll by @freekmurze and @michaelnabil230Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.11.0...7.12.0
weightedRandom macro by @freekmurze in https://github.com/spatie/laravel-collection-macros/pull/224Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.10.0...7.11.0
path macro by @michael-rubel in https://github.com/spatie/laravel-collection-macros/pull/220Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.8.0...7.9.0
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.7.0...7.8.0
if macro by @freekmurze in https://github.com/spatie/laravel-collection-macros/pull/217Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.6.0...7.7.0
Full Changelog: https://github.com/spatie/laravel-collection-macros/compare/7.5.0...7.6.0
insertAt macro (#209)pluckMany (#207)firstOrPushDO NOT USE: release was incorrectly tagged
How can I help you explore Laravel packages today?