public function migrateOrders()
    {
        $start = $count = 0;
        $batch = Order::get()->sort('Created', 'ASC')->limit($start, self::$batch_size);
        while ($batch->exists()) {
            foreach ($batch as $order) {
                $this->migrate($order);
                echo '. ';
                $count++;
            }
            $start += self::$batch_size;
            $batch = $batch->limit($start, self::$batch_size);
        };
        echo "$count orders updated.\n<br/>";
    }
public function migrateOrders()
    {
        $start = $count = 0;
        $batch = Order::get()->sort('Created', 'ASC')->limit($start, self::$batch_size);
        while ($batch->exists()) {
            foreach ($batch as $order) {
                $this->migrate($order);
                echo '. ';
                $count++;
            }
            $start += self::$batch_size;
            $batch = $batch->limit($start, self::$batch_size);
        };
        echo "$count orders updated.\n<br/>";
    }
public function migrateOrders ( ) { $ start = $ count = 0 ; $ batch = Order :: get ( ) -> sort ( 'Created' , 'ASC' ) -> limit ( $ start , self :: $ batch_size ) ; while ( $ batch -> exists ( ) ) { foreach ( $ batch as $ order ) { $ this -> migrate ( $ order ) ; echo '. ' ; $ count ++ ; } $ start += self :: $ batch_size ; $ batch = $ batch -> limit ( $ start , self :: $ batch_size ) ; } ; echo "$count orders updated.\n<br/>" ; }
batch process orders
batch process orders