laravel-collections
Installation
SKILL.md
Laravel Collections
Quick Decision Guide
"Which method do I use?"
Find items:
| Need | Method |
|---|---|
| First item matching condition | first(fn) or firstWhere('key', 'value') |
| First item or throw | firstOrFail(fn) |
| Exactly one match or throw | sole(fn) |
| Check value exists | contains('value') or contains('key', 'value') |
| Check key exists | has('key') |
| All items match condition | every(fn) |