private function appendFields(QueryBuilder $builder, array $fields)
    {
        list($fields, $include) = $this->prepareFields($fields);
        if (!empty($fields)) {
            $method = (true === $include) ? 'select' : 'exclude';
            $builder->$method(array_keys($fields));
        }
        return $this;
    }
private function appendFields(QueryBuilder $builder, array $fields)
    {
        list($fields, $include) = $this->prepareFields($fields);
        if (!empty($fields)) {
            $method = (true === $include) ? 'select' : 'exclude';
            $builder->$method(array_keys($fields));
        }
        return $this;
    }
private function appendFields ( QueryBuilder $ builder , array $ fields ) { list ( $ fields , $ include ) = $ this -> prepareFields ( $ fields ) ; if ( ! empty ( $ fields ) ) { $ method = ( true === $ include ) ? 'select' : 'exclude' ; $ builder -> $ method ( array_keys ( $ fields ) ) ; } return $ this ; }
Appends projection fields to a Query Builder.

@param   QueryBuilder    $builder
@param   array           $fields
@return  self
Appends projection fields to a Query Builder .