$query = (new Query())->from('model')->orderBy('id');
foreach ($query->batch(100) as $models) {
// $models is an array of 100 or fewer rows from the user table
...
}
// or if you want to iterate the row one by one:
foreach ($query->each() as $model) {
// $model represents one row of data
...
}