Everything on collections.
3 articles tagged collections, sorted newest first.
PHP 8.6 Partial Function Application: Delete Half the Closures in Your Laravel App
PHP 8.6 lets you write str_replace(' ', '-', ?) and get a closure back. Here's what the ? and ... placeholders actually do, rewritten against real Laravel code, and where they bite.
First-Class Callable Syntax for Cleaner Laravel Collection Pipelines
Turn any method into a Closure with a trailing (...) for cleaner Laravel collection pipelines — and dodge the map() arity trap that silently corrupts your output.
Processing large CSV files with Laravel's lazy collections
Loading a 100k-row CSV with `collect()` will blow your memory limit. Laravel's `LazyCollection` gives you the full Collection API backed by PHP generators: here's how to use it.