spatie/laravel-collection-macros
A set of useful Laravel collection macros observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 68
- Release rhythm 47
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 93.0
- age_days: 3690
- days_rel: 194
- days_push: 194
- n_releases_24m: 5
Adoption not part of the score
1910 stars · 144 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Spatie PHP package that adds a set of handy macros to Laravel's collection class, such as after, at, filterMap, validate, split, and dd. It installs via Composer and automatically registers itself with a Laravel application.
Use cases
- add extra methods to Laravel collections
- validate every item in a collection with a rule
- split a collection into a given number of groups
- debug collection contents with dd
- map and filter collections in one pass
- group collection items by Eloquent model
When to choose
- you use Laravel and repeatedly write the same collection helper logic
- you want well-tested, community-maintained collection extensions
- you want expressive collection operations like eachCons, extract, or fromPairs
When to avoid
- you don't use the Laravel framework
- you only need one or two trivial helpers you can write yourself
- you need framework-agnostic collection utilities outside Laravel
Facets
library · maturity active
developer-tools web-development developer-tools php laravel collections macros spatie php-package
3 sources
- readme: https://github.com/spatie/laravel-collection-macros · fetched 2026-08-28 · 236a16f3055d
- homepage: https://freek.dev/540-some-handy-collection-macros · fetched 2026-08-29 · 34d9db93f627
- site_page: https://freek.dev/about · fetched 2026-08-29 · e0ef9dccbb05
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/laravel-collection-macros | main | 67 |
For agents
markdown · JSON · MCP: product_card(name="spatie/laravel-collection-macros")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem