tightenco/collect
A standalone port of Laravel’s Illuminate\Support\Collection for non-Laravel projects. Get expressive, chainable, higher-order methods like map, filter, reduce, pluck, groupBy, and more with minimal dependencies—ideal for any PHP app.
Illuminate\Support\Collection class, making it ideal for projects already using Laravel or needing Laravel-like collection functionality without full framework dependency.pluck(), where(), groupBy()) to Laravel’s built-in collections, reducing refactoring for teams familiar with Laravel.use Tightenco\Collect\Support\Collection).collect() helper).Macroable trait).League\Collection, Illuminate\Support\Collection in non-Laravel PHP).Illuminate\Support\Collection (e.g., Laravel itself, spatie/laravel-collection-macros).League\Collection or a custom wrapper suffice with lower risk?php-collection, spatie/array-to-object) that offer similar functionality?use Illuminate\Support\Collection with use Tightenco\Collect\Support\Collection).collect() helper) without full framework dependency.Illuminate/Container).Illuminate\Support\Collection usage and dependencies.Illuminate\Support\Collection with Tightenco\Collect\Support\Collection in a non-critical module.pluck(), filter()).push(), merge()) after validation.composer.json replaces illuminate/support with tightenco/collect (if applicable).Collection class and test core methods.collect(), tap()).sensio-labs/security-checker) are critical.composer.json to avoid unintended updates.array_merge instead of Collection::merge if X fails").memory_get_usage()).symfony/collections) may become incompatible.League\Collection).where(), sortBy()).first() behaves differently here").How can I help you explore Laravel packages today?