tsmliyun / laravel_quick_admin

20 stars 15 forks source link

登录时怎么判断是使用用户名还是手机号 #6

Open xingxuewen opened 4 years ago

xingxuewen commented 4 years ago

现在是用户名登录 但总是匹配手机号登录

tsmliyun commented 4 years ago

目前系统里是用 email 字段登录;代码可见 vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php

 protected function validateLogin(Request $request)
    {
        $this->validate($request, [
            $this->username() => 'required|string',
            'password' => 'required|string',
        ]);
    }