📅  最后修改于: 2022-03-11 14:54:06.080000             🧑  作者: Mango
#METHOD 1
DB::table('users')->orderBy('id')->chunk(100, function ($users) {
foreach ($users as $user) {
//
}
});
#METHOD 2
foreach (DB::table('users')->orderBy('id')->cursor() as $flight) {
//
}