Running
Model::where('status', 'pending')->chunk(200, ...) and updating status to 'processed' inside the callback silently skips half your rows because OFFSET shifts as rows leave the filter. Switching to chunkById(200) paginates by id > $lastId so every row gets…Oh… this ones bites like a b… thanks so much for this tips! Shouldn’t we have a whole app dedicated to those precious tips? Laravel is full of surprises sometimes 😅