protected function getColumn($column, array $relations = [])
    {
        /** @var \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Relations\Relation $model */
        $model = $this->repository->makeModel();

        if (empty($relations)) {
            return "{$model->getTable()}.{$column}";
        }

        foreach ($relations as $relation) {
            $model = $model instanceof Model
                ? $model->{camel_case($relation)}()
                : $model->getRelated()->{camel_case($relation)}();
        }

        return "{$model->getRelated()->getTable()}.{$column}";
    }
protected function getColumn($column, array $relations = [])
    {
        /** @var \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Relations\Relation $model */
        $model = $this->repository->makeModel();

        if (empty($relations)) {
            return "{$model->getTable()}.{$column}";
        }

        foreach ($relations as $relation) {
            $model = $model instanceof Model
                ? $model->{camel_case($relation)}()
                : $model->getRelated()->{camel_case($relation)}();
        }

        return "{$model->getRelated()->getTable()}.{$column}";
    }
protected function getColumn ( $ column , array $ relations = [ ] ) { /** @var \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Relations\Relation $model */ $ model = $ this -> repository -> makeModel ( ) ; if ( empty ( $ relations ) ) { return "{$model->getTable()}.{$column}" ; } foreach ( $ relations as $ relation ) { $ model = $ model instanceof Model ? $ model -> { camel_case ( $ relation ) } ( ) : $ model -> getRelated ( ) -> { camel_case ( $ relation ) } ( ) ; } return "{$model->getRelated()->getTable()}.{$column}" ; }
Returns column name prefixed with table name.

@param string $column
@param array  $relations

@return string
Returns column name prefixed with table name .