protected function defaultSort(Builder $query, array $options = [])
    {
        if (isset($this->sortProperty)) {
            $direction = $this->sortDirection === 1 ? 'DESC' : 'ASC';
            $query->orderBy($this->sortProperty, $direction);
        }
    }
protected function defaultSort(Builder $query, array $options = [])
    {
        if (isset($this->sortProperty)) {
            $direction = $this->sortDirection === 1 ? 'DESC' : 'ASC';
            $query->orderBy($this->sortProperty, $direction);
        }
    }
protected function defaultSort ( Builder $ query , array $ options = [ ] ) { if ( isset ( $ this -> sortProperty ) ) { $ direction = $ this -> sortDirection === 1 ? 'DESC' : 'ASC' ; $ query -> orderBy ( $ this -> sortProperty , $ direction ) ; } }
Order query by the specified sorting property
@param  Builder $query
@param  array  $options
@return void
Order query by the specified sorting property