protected function isFieldSortable(Builder $builder, $field)
    {
        $sortable = $this->_getSortableAttributes($builder);

        return in_array($field, $sortable) || in_array('*', $sortable);
    }
protected function isFieldSortable(Builder $builder, $field)
    {
        $sortable = $this->_getSortableAttributes($builder);

        return in_array($field, $sortable) || in_array('*', $sortable);
    }
protected function isFieldSortable ( Builder $ builder , $ field ) { $ sortable = $ this -> _getSortableAttributes ( $ builder ) ; return in_array ( $ field , $ sortable ) || in_array ( '*' , $ sortable ) ; }
Check if field is sortable for given model.

@param Builder $builder query builder
@param string $field field name

@return bool
Check if field is sortable for given model .