Laravel 12.36: Cleaning Up Collections and Controlling HTTP Concurrency
Refined Eloquent Collection Management
Managing insert or fill methods, as
Before this update, developers had to loop through every model in a collection to manually reset the appends array. withoutAppends and setAppends methods directly on the collection class. This means you can strip away those non-persistent attributes from an entire dataset in a single, fluent call, keeping your code clean and your database operations safe from column-not-found errors.
Precision Concurrency in HTTP Batches
Parallelizing requests is a standard way to boost performance, but firing off dozens of requests simultaneously can overwhelm external APIs or trigger rate limits.
With the latest PR from contributor Wendell, you now have granular control over concurrency. For the standard Http::pool, you simply pass the maximum number of concurrent requests as a second parameter. For the newer concurrency() method. This ensures you never exceed a specific number of simultaneous connections, allowing for high-performance data fetching without the risk of getting your IP blacklisted.
Navigation Insight via Previous Route Names
Web applications frequently need to know where a user just came from to provide better context or conditional logic. While we have long had access to the previous URL, URLs can be messy, dynamic, and hard to parse reliably.
previousRoute method to the session object. This allows you to retrieve the named route of the last page visited, such as post.index or dashboard, rather than a raw string like /posts?page=2&filter=recent. It is a small but powerful quality-of-life improvement that makes navigation logic significantly more robust.
Summary of Laravel 12.36
These updates prove that even as
