|
|
@@ -20,6 +20,10 @@ class User extends BaseModel
|
|
|
public static function getCsId($admin_id) {
|
|
|
return self::where('from', 0)->where('uid', $admin_id)->value('user_id');
|
|
|
}
|
|
|
+
|
|
|
+ public static function getAdminId($user_id) {
|
|
|
+ return self::where('from', 0)->where('user_id', $user_id)->value('uid');
|
|
|
+ }
|
|
|
public function getAvatarAttr($value,$data)
|
|
|
{
|
|
|
return avatarUrl($data['avatar'],$data['realname'],$data['user_id']);
|