Latest SPT Version Bug

This fixes an issue with the latest SPT version query sorting the version numbers incorrectly.
This commit is contained in:
Refringe 2025-01-28 22:42:51 -05:00
parent 6cd98a617e
commit a60bb5819a
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k

View File

@ -168,7 +168,9 @@ class SptVersion extends Model
{
return Cache::remember('latest_spt_version', 300, function () {
return SptVersion::select(['version', 'version_major', 'version_minor', 'version_patch', 'version_pre_release'])
->orderByDesc('version')
->orderByDesc('version_major')
->orderByDesc('version_minor')
->orderByDesc('version_patch')
->first();
});
}