'name' => [
'asc' => new Expression("(substring(name, '^[0-9]+'))::int ASC, lower(name) ASC, LENGTH(name) ASC, split_part(name, '/', 2) ASC"),
'desc' => new Expression("(substring(name, '^[0-9]+'))::int DESC, lower(name) DESC, LENGTH(name) DESC, split_part(name, '/', 2) DESC"),
],
Proposed new feature or change
Add the ability to provide
array|string|ExpressionInterfaceas the sort direction, which will be used as a parameter forQuery::orderBy().