forge/app/Services/LatestSptVersionService.php
Refringe 7fe1fad01b
Mod Listing Page Changes
- Updated visual look of the listing to include all filters at the top of the page
- Updated SPT version filter to be able to filter more than one version at a time (defaults to current minor version)
- Moved location of Livewire components into subfolder
- Moved query building methods for the listing into a `ModFilter` class
- Adds a `isLatestMinor` method on the SptVersion model that checks if the current version number is of the latest minor version release
- Livewire filter properties are now saved to the URL when changed
- Updated the top navigation link to include a "Mods" menu item.

TODO:
- Search codebase for "TODO". I've left notes. :|
2024-08-15 17:57:35 -04:00

20 lines
376 B
PHP

<?php
namespace App\Services;
use App\Models\SptVersion;
class LatestSptVersionService
{
protected ?SptVersion $version = null;
public function getLatestVersion(): ?SptVersion
{
if ($this->version === null) {
$this->version = SptVersion::select('version')->orderByDesc('version')->first();
}
return $this->version;
}
}