Aplus Framework Docs

OrderBy

Trait OrderBy.

Tags
see
https://mariadb.com/kb/en/order-by/

Table of Contents

orderBy()  : static
Appends columns to the ORDER BY clause.
orderByAsc()  : static
Appends columns with the ASC direction to the ORDER BY clause.
orderByDesc()  : static
Appends columns with the DESC direction to the ORDER BY clause.
renderOrderBy()  : string|null
Renders the ORDER BY clause.

Methods

orderBy()

Appends columns to the ORDER BY clause.

public orderBy(Closure|string $column, Closure|string ...$columns) : static
Parameters
$column : Closure|string

The column name or a subquery

$columns : Closure|string

Extra column names and/or subqueries

Return values
static

orderByAsc()

Appends columns with the ASC direction to the ORDER BY clause.

public orderByAsc(Closure|string $column, Closure|string ...$columns) : static
Parameters
$column : Closure|string

The column name or a subquery

$columns : Closure|string

Extra column names and/or subqueries

Return values
static

orderByDesc()

Appends columns with the DESC direction to the ORDER BY clause.

public orderByDesc(Closure|string $column, Closure|string ...$columns) : static
Parameters
$column : Closure|string

The column name or a subquery

$columns : Closure|string

Extra column names and/or subqueries

Return values
static

renderOrderBy()

Renders the ORDER BY clause.

protected renderOrderBy() : string|null
Return values
string|null

The ORDER BY clause or null if it was not set

Search results