protected function processSort(array $models = [])
    {
        $field = $this->builder->getSortByField();

        $flags = $this->builder->getSortByFlags();

        $direction = $this->builder->getSortByDirection();

        $desc = ($direction === 'desc' ? true : false);

        return $this->newCollection($models)->sortBy($field, $flags, $desc);
    }
protected function processSort(array $models = [])
    {
        $field = $this->builder->getSortByField();

        $flags = $this->builder->getSortByFlags();

        $direction = $this->builder->getSortByDirection();

        $desc = ($direction === 'desc' ? true : false);

        return $this->newCollection($models)->sortBy($field, $flags, $desc);
    }
protected function processSort ( array $ models = [ ] ) { $ field = $ this -> builder -> getSortByField ( ) ; $ flags = $ this -> builder -> getSortByFlags ( ) ; $ direction = $ this -> builder -> getSortByDirection ( ) ; $ desc = ( $ direction === 'desc' ? true : false ) ; return $ this -> newCollection ( $ models ) -> sortBy ( $ field , $ flags , $ desc ) ; }
Sorts LDAP search results.

@param array $models

@return Collection
Sorts LDAP search results .