mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
move modversion ordering
to model
This commit is contained in:
parent
30cdc60ae0
commit
fce5bd4b04
@ -31,7 +31,7 @@ class ModController extends Controller
|
||||
$mod = Mod::select()
|
||||
->withTotalDownloads()
|
||||
->with([
|
||||
'versions' => fn($query) => $query->orderByDesc('version'),
|
||||
'versions',
|
||||
'latestSptVersion',
|
||||
'users:id,name',
|
||||
'license:id,name,link'
|
||||
|
@ -43,7 +43,7 @@ class Mod extends Model
|
||||
|
||||
public function versions(): HasMany
|
||||
{
|
||||
return $this->hasMany(ModVersion::class);
|
||||
return $this->hasMany(ModVersion::class)->orderByDesc('version');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user