PHP Trait Kyslik\ColumnSortable\Sortable

Exibir arquivo Open project: kyslik/column-sortable

Public Methods

Method Description
scopeSortable ( Builder $query, array | null $defaultSortParameters = null ) : Builder

Private Methods

Method Description
columnExists ( $model, $column ) : boolean
formatToSortParameters ( array | string $sort ) : array
parseSortParameters ( array $sortParameters ) : array
queryJoinBuilder ( Builder $query, $relation ) : Builder
queryOrderBuilder ( Builder $query, array $sortParameters ) : Builder

Method Details

scopeSortable() public method

public scopeSortable ( Builder $query, array | null $defaultSortParameters = null ) : Builder
$query Illuminate\Database\Query\Builder
$defaultSortParameters array | null
return Illuminate\Database\Query\Builder