tp6之 /think/facade/Validate校验用户名和密码
参考 https://blog.csdn.net/srbhll/article/details/117022432 https://blog.csdn.net/qq_37682202/article/details/100880778 条件
控制器中
$result = /think/facade/Validate::rule([ //这里我用的是验证器来验证管理员账号密码是否正确
'username' => 'unique:user,username^password'
])->check([
'username' => $data['username'],
// 'password' => sha1($data['password'])
'password' =>
共有 0 条评论