public function prefixColumnsForJoin()
    {
        if (!$columns = $this->query->columns) {
            return $this->select($this->model->getTable() . '.*');
        }

        foreach ($columns as $key => $column) {
            if ($this->model->hasColumn($column)) {
                $columns[$key] = $this->model->getTable() . '.' . $column;
            }
        }

        $this->query->columns = $columns;

        return $this;
    }
public function prefixColumnsForJoin()
    {
        if (!$columns = $this->query->columns) {
            return $this->select($this->model->getTable() . '.*');
        }

        foreach ($columns as $key => $column) {
            if ($this->model->hasColumn($column)) {
                $columns[$key] = $this->model->getTable() . '.' . $column;
            }
        }

        $this->query->columns = $columns;

        return $this;
    }
public function prefixColumnsForJoin ( ) { if ( ! $ columns = $ this -> query -> columns ) { return $ this -> select ( $ this -> model -> getTable ( ) . '.*' ) ; } foreach ( $ columns as $ key => $ column ) { if ( $ this -> model -> hasColumn ( $ column ) ) { $ columns [ $ key ] = $ this -> model -> getTable ( ) . '.' . $ column ; } } $ this -> query -> columns = $ columns ; return $ this ; }
Prefix selected columns with table name in order to avoid collisions.

@return $this
Prefix selected columns with table name in order to avoid collisions .