Laravel Chunkbyid

Flight::where('departed', true)
    ->chunkById(200, function ($flights) {
        $flights->each->update(['departed' => false]);
    }, $column = 'id');


The chunkById method will always retrieve models with an id column greater than the last model in the previous chunk
Irfan