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, 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. 👀