pragmarx/coollection
Coollection repackages Laravel-style collections (via Tightenco\Collect) to let you access items as object properties. Traverse nested arrays/objects with fluent collection methods, then read values like $countries->where('name.common','US')->first()->currency->name.
coollection enables cleaner, more intuitive code for nested data access, reducing cognitive load for developers working with deeply nested arrays or API responses (e.g., replacing collect($data)['user']['profile']['address']['city'] with $collection->user->profile->address->city). This aligns with roadmap goals to improve maintainability and onboarding for junior engineers.$response->data->pagination->total_pages instead of $response['data']['pagination']['total_pages'].collect($request->all())['user']['roles'][0]['permissions'] → $input->user->roles->first()->permissions).->user->profile->{dynamic_key} may not trigger IDE hints).coollection remains more expressive for nested data).collect() for large datasets; v0.5.4 claims "huge improvements in speed," but test locally).coollection lags behind Laravel’s latest collection updates; check changelog for compatibility).graphql-php).collect() with explicit array access).illuminate/collections).*"Coollection is a 5-minute upgrade that makes our codebase 10x more readable for complex data—like comparing $user->orders->filter(fn($o) => $o->status === 'shipped')->count() to the current nested collect($user['orders'])->where('status', 'shipped')->count().
*"This is Laravel’s Collection with object dot notation—think $collection->user->address->city instead of $collection['user']['address']['city'].
collect()->where()->first()->get() hell.collect() under the hood; just adds syntax sugar.->key() for static access).Key Metric to Track: "Lines of code reduced in nested data access" (target: 20–30% fewer LOC for complex queries).
How can I help you explore Laravel packages today?