mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
Merge remote-tracking branch 'upstream/develop' into impl/results-per-page
This commit is contained in:
commit
2b7b38808d
@ -108,6 +108,11 @@ class Mod extends Model
|
|||||||
*/
|
*/
|
||||||
public function toSearchableArray(): array
|
public function toSearchableArray(): array
|
||||||
{
|
{
|
||||||
|
$this->load([
|
||||||
|
'latestVersion',
|
||||||
|
'latestVersion.latestSptVersion',
|
||||||
|
]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
@ -138,6 +143,12 @@ class Mod extends Model
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Eager load the latest mod version, and it's latest SPT version.
|
||||||
|
$this->load([
|
||||||
|
'latestVersion',
|
||||||
|
'latestVersion.latestSptVersion',
|
||||||
|
]);
|
||||||
|
|
||||||
// Ensure the mod has a latest version.
|
// Ensure the mod has a latest version.
|
||||||
if ($this->latestVersion()->doesntExist()) {
|
if ($this->latestVersion()->doesntExist()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -137,6 +137,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
*/
|
*/
|
||||||
public function shouldBeSearchable(): bool
|
public function shouldBeSearchable(): bool
|
||||||
{
|
{
|
||||||
|
$this->load(['bans']);
|
||||||
|
|
||||||
return $this->isNotBanned();
|
return $this->isNotBanned();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user