index page add top uploader

This commit is contained in:
xiaomlove
2022-04-25 01:22:07 +08:00
parent c3969aeee9
commit a47b33a983
18 changed files with 156 additions and 60 deletions

View File

@@ -107,7 +107,15 @@ class User extends Authenticatable
public function getClassTextAttribute(): string
{
return self::$classes[$this->class]['text'] ?? '';
if (!isset(self::$classes[$this->class]['text'])) {
return '';
}
$classText = self::$classes[$this->class]['text'];
$alias = Setting::get("account.{$this->class}_alias");
if (!empty($alias)) {
$classText .= "({$alias})";
}
return $classText;
}
public function getDonateStatusAttribute()