src/QueryBuilder.php
public function batchInsert(array $data)
    {
        $ids = [];
        foreach ($data as $item) {
            if (isset($item['id'])) {
                if (array_key_exists($item['id'], $this->table->data['data'])) {
                    continue;
                }
            } else {
                $item = ['id' => $this->generateId()] + $item;
            }

            $ids[] = $this->insert($item);
        }

        return $ids;
    }
public function batchInsert(array $data)
    {
        $ids = [];
        foreach ($data as $item) {
            if (isset($item['id'])) {
                if (array_key_exists($item['id'], $this->table->data['data'])) {
                    continue;
                }
            } else {
                $item = ['id' => $this->generateId()] + $item;
            }

            $ids[] = $this->insert($item);
        }

        return $ids;
    }
public function batchInsert ( array $ data ) { $ ids = [ ] ; foreach ( $ data as $ item ) { if ( isset ( $ item [ 'id' ] ) ) { if ( array_key_exists ( $ item [ 'id' ] , $ this -> table -> data [ 'data' ] ) ) { continue ; } } else { $ item = [ 'id' => $ this -> generateId ( ) ] + $ item ; } $ ids [ ] = $ this -> insert ( $ item ) ; } return $ ids ; }
Batch insert multiple records

@param  array $data List of records
@return array $ids
Batch insert multiple records