unify sub category sort

This commit is contained in:
xiaomlove
2023-04-21 00:50:10 +08:00
parent e5c91d40ce
commit 10cd69852c
6 changed files with 74 additions and 75 deletions

View File

@@ -176,7 +176,7 @@ class SearchBoxRepository extends BaseRepository
$select .= sprintf('<option value="%s">%s</option>', 0, nexus_trans('nexus.select_one_please'));
$list = NexusDB::table($table)->where(function (Builder $query) use ($searchBox) {
return $query->where('mode', $searchBox->id)->orWhere('mode', 0);
})->get();
})->orderBy('sort_index', 'desc')->get();
foreach ($list as $item) {
$selected = '';
if (isset($torrentInfo[$torrentField]) && $torrentInfo[$torrentField] == $item->id) {