mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-06 10:02:49 +08:00
完成管理员管理
This commit is contained in:
@@ -13,13 +13,21 @@ class Admin extends Model
|
||||
|
||||
public function getAvatarAttr($value)
|
||||
{
|
||||
|
||||
if(empty($value)){
|
||||
return '/static/images/avatar.jpeg';
|
||||
}
|
||||
|
||||
return \get_source_link($value);
|
||||
}
|
||||
|
||||
public function getGroupAttr()
|
||||
{
|
||||
if(empty($this->getData('group_id'))){
|
||||
return '未分组';
|
||||
return [];
|
||||
}
|
||||
|
||||
return AdminGroup::where('id',$this->getData('group_id'))->cache(1)->find();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user