[色子游戏]玩家-新增phone字段
This commit is contained in:
@@ -15,6 +15,7 @@ use plugin\saiadmin\basic\think\BaseModel;
|
||||
*
|
||||
* @property $id ID
|
||||
* @property $username 用户名
|
||||
* @property $phone 手机
|
||||
* @property $name 昵称
|
||||
* @property $password 密码
|
||||
* @property $status 状态
|
||||
@@ -62,6 +63,16 @@ class DicePlayer extends BaseModel
|
||||
$query->where('name', 'like', '%'.$value.'%');
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号 模糊搜索
|
||||
*/
|
||||
public function searchPhoneAttr($query, $value)
|
||||
{
|
||||
if ($value !== '' && $value !== null) {
|
||||
$query->where('phone', 'like', '%' . $value . '%');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态 搜索
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user