Most Laravel developers know pipe().
Far fewer know about pipeThrough().
Instead of one transformation, you can pass your collection through multiple reusable callables, keeping each step small, focused, and easy to test.
Have you ever used it?
Punyapal Shah
@MrPunyapal
New #[WithoutMiddleware] attribute already documented in the Laravel attribute list, check it out 👇
mrpunyapal.github.io/laravel-attributes-list/attributes/controllers/WithoutMiddleware
Developers, do you know how many open-source projects you have contributed to?
Mine is 100+, I guess.
How to find? Ask your AI to find it via `gh` (GitHub CLI).
Laravel developers, are you filtering the same collection twice?
If you need both the matching and non-matching items, partition() does it in a single call.
Bonus: it even supports higher-order messages. 👀
Laravel developers, ever wanted pluck()-like output with more than one column?
pluck() is intentionally designed for a single value.
Instead, retrieve only the columns you need and use map->only().
Need the collection keyed by id? mapWithKeys() does the trick.