feature: send thankscard page
This commit is contained in:
@@ -88,5 +88,20 @@ class User extends Authenticatable
|
||||
|
||||
return asset($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user's department name.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDepartmentNameAttribute()
|
||||
{
|
||||
$deptVal = $this->departments;
|
||||
if (is_numeric($deptVal)) {
|
||||
$idx = ((int)$deptVal) - 1;
|
||||
return config('constants.DEPARTMENTS')[$idx] ?? $deptVal;
|
||||
}
|
||||
return $deptVal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user