where('id', $id)->update([ 'status' => 8, 'finish_time' => $now - rand(1800, 7200), 'verify_time' => $now - rand(600, 1800), 'updatetime' => $now ]); } echo "Successfully updated orders to status 8 (COMPLETED).\n";