mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-30 00:47:22 +08:00
show rainbow ID in userdetails page
This commit is contained in:
@@ -17,14 +17,18 @@ class UserMeta extends NexusModel
|
||||
|
||||
protected $appends = ['meta_key_text'];
|
||||
|
||||
protected $casts = [
|
||||
'deadline' => 'datetime',
|
||||
];
|
||||
|
||||
public function getMetaKeyTextAttribute()
|
||||
{
|
||||
return nexus_trans('label.user_meta.meta_keys.' . $this->meta_key) ?? '';
|
||||
}
|
||||
|
||||
public static function consumeBenefit($uid, $metaKey)
|
||||
public function isValid(): bool
|
||||
{
|
||||
|
||||
return $this->status == self::STATUS_NORMAL && ($this->getRawOriginal('deadline') === null || ($this->deadline && $this->deadline->gte(now())));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
Filament::registerNavigationGroups([
|
||||
'User',
|
||||
'Torrent',
|
||||
'Other',
|
||||
'System',
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user