Skip to content

Commit ab9f028

Browse files
committed
Update AdminController
1 parent 9f58669 commit ab9f028

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/Http/Controllers/Api/AdminController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,15 +1180,15 @@ private function applySortingJoin($query, $sort, $tableName = null)
11801180
];
11811181

11821182
if ($sort && $sort == 'suspended') {
1183-
$query->where('status', 6);
1183+
$query->where('status', 6)->orderByDesc('updated_at');
11841184

11851185
return $query;
11861186
} elseif ($sort && $sort == 'disabled') {
1187-
$query->where('status', 7);
1187+
$query->where('status', 7)->orderByDesc('updated_at');
11881188

11891189
return $query;
11901190
} elseif ($sort && $sort == 'deleted') {
1191-
$query->where('status', 8);
1191+
$query->where('status', 8)->orderByDesc('updated_at');
11921192

11931193
return $query;
11941194
} elseif ($sort && isset($sortOptions[$sort])) {

0 commit comments

Comments
 (0)