public function insertUsing(array $columns, $query)
    {
        [$sql, $bindings] = $this->createSub($query);

        return $this->connection->insert(
            $this->grammar->compileInsertUsing($this, $columns, $sql),
            $this->cleanBindings($bindings)
        );
    }
public function insertUsing(array $columns, $query)
    {
        [$sql, $bindings] = $this->createSub($query);

        return $this->connection->insert(
            $this->grammar->compileInsertUsing($this, $columns, $sql),
            $this->cleanBindings($bindings)
        );
    }
public function insertUsing ( array $ columns , $ query ) { [ $ sql , $ bindings ] = $ this -> createSub ( $ query ) ; return $ this -> connection -> insert ( $ this -> grammar -> compileInsertUsing ( $ this , $ columns , $ sql ) , $ this -> cleanBindings ( $ bindings ) ) ; }
Insert new records into the table using a subquery.

@param  array  $columns
@param  \Closure|\Illuminate\Database\Query\Builder|string  $query
@return bool
Insert new records into the table using a subquery .