We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30becf2 commit e2ba80cCopy full SHA for e2ba80c
src/Traits/WithSorting.php
@@ -44,7 +44,7 @@ public function sortBy(string $field): ?string
44
*/
45
public function applySorting($query)
46
{
47
- if (! empty($this->defaultSortColumn) && empty($this->sorts)) {
+ if (! empty($this->defaultSortColumn) && ! count($this->sorts)) {
48
return $query->orderBy($this->defaultSortColumn, $this->defaultSortDirection);
49
}
50
0 commit comments