atournayre/collection
Type-safe PHP collections with list/map factories, plus immutable variants. Includes DecimalValue collections with consistent precision handling. Build domain-specific collections by extending TypedCollection to enforce item types and safe manipulation.
Adopt if:
map, filter, groupBy, flatten) in PHP/Laravel.Look elsewhere if:
Collection component).For Executives:
"This package lets us ship collection-heavy features 30–50% faster by reusing battle-tested PHP utilities—think of it as Laravel’s built-in Collection on steroids. For example, it could cut the dev time for our [X feature] from 2 weeks to 5 days, with zero risk (MIT license) and minimal overhead. It’s a low-lift way to improve backend efficiency without hiring specialized talent."
For Engineering:
*"The atournayre/collection library extends Laravel’s native collections with missing but critical methods (e.g., chunk, diffAssoc, pluckRecursive) and optimizes performance for large datasets. It’s a drop-in replacement for custom helpers, reducing technical debt. Pros:
For Developers:
"Imagine writing User::all()->groupBy('role')->pluckRecursive('permissions') in one line instead of 10. This package adds missing methods (like intersectByKeys, rejectEmpty) and optimizes common operations. It’s like upgrading from jQuery to Lodash for PHP collections—no learning curve, just productivity."
How can I help you explore Laravel packages today?