getSortByFlags() public method

Returns the query builders sort by flags.
public getSortByFlags ( ) : integer
return integer
Ejemplo n.º 1
0
 /**
  * Sorts LDAP search results.
  *
  * @param array $models
  *
  * @return Collection
  */
 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(function (Model $model) use($field) {
         return $model->getAttribute($field, 0);
     }, $flags, $desc);
 }