mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
improve filament trans + user profile actions
This commit is contained in:
@@ -33,7 +33,7 @@ class ExamUser extends NexusModel
|
||||
|
||||
public function getStatusTextAttribute(): string
|
||||
{
|
||||
return self::$status[$this->status]['text'] ?? '';
|
||||
return nexus_trans('exam-user.status.' . $this->status);
|
||||
}
|
||||
|
||||
public function getIsDoneTextAttribute(): string
|
||||
|
||||
@@ -9,5 +9,14 @@ class UserMedal extends NexusModel
|
||||
const STATUS_NOT_WEARING = 0;
|
||||
const STATUS_WEARING = 1;
|
||||
|
||||
public function medal()
|
||||
{
|
||||
return $this->belongsTo(Medal::class, 'medal_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'uid');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user