...
|
...
|
@@ -20,7 +20,8 @@ class User extends Model |
|
|
protected $append = [
|
|
|
'prevtime_text',
|
|
|
'logintime_text',
|
|
|
'jointime_text'
|
|
|
'jointime_text',
|
|
|
'avatar'
|
|
|
];
|
|
|
|
|
|
public function getOriginData()
|
...
|
...
|
@@ -45,6 +46,7 @@ class User extends Model |
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
self::beforeUpdate(function ($row) {
|
|
|
$changedata = $row->getChangedData();
|
|
|
$origin = $row->getOriginData();
|
...
|
...
|
@@ -57,6 +59,12 @@ class User extends Model |
|
|
});
|
|
|
}
|
|
|
|
|
|
public function getAvatarAttr($value,$data){
|
|
|
$list = $this->where('id',$data['id'])->value('avatar');
|
|
|
$order = 'http://campus.shs.broing.cn'.$list;
|
|
|
return $order;
|
|
|
}
|
|
|
|
|
|
public function getGenderList()
|
|
|
{
|
|
|
return ['1' => __('Male'), '0' => __('Female')];
|
...
|
...
|
|