Commit f0057079 authored by Andrei Fomin's avatar Andrei Fomin

Added metadata sorting

parent 3cd44d09
......@@ -329,12 +329,14 @@ class Builder extends QueryBuilder {
* Add an "order by" clause to the query.
*
* @param string $column
* @param string $direction
* @param mixed $direction Direction of soring or metadata sorting.
* @return Builder
*/
public function orderBy($column, $direction = 'asc')
{
if (!is_array($direction)) {
$direction = (strtolower($direction) == 'asc' ? 1 : -1);
}
if ($column == 'natural')
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment