Sep 15, 2024
toBase is just a way of saying I need eloquent query builder features but I do not want the end result in Eloquent Object. So it reduces memory heavily.
Lazy Collection is combination of chunkById and map in one bundle. While cursor does single retrieval at a time making it more time resource consuming while lazy collection loads 10K rows at once and process one by one.