Performance enhancements for system view

This commit is contained in:
2023-04-15 13:34:08 +10:00
parent c5500020ae
commit 23e8522e1a
3 changed files with 26 additions and 17 deletions

View File

@@ -44,6 +44,13 @@ class System extends Model
return $this->hasMany(SystemLog::class);
}
public function logs_recent()
{
return $this->hasMany(SystemLog::class)
->orderby('created_at','DESC')
->limit(10);
}
/**
* Session Passwords for system
*