passport怎么修改username
$response = Http::asForm()->post('http://passport-app.test/oauth/token', [
'grant_type' => 'password',
'client_id' => 'client-id',
'client_secret' => 'client-secret',
'username' => 'taylor@laravel.com',
'password' => 'my-password',
'scope' => '*',
]);
## 需要把 'username' => 'taylor@laravel.com', 改为指定的字段作为用户名登录
目前看到默认查的是email字段
select * from `users` where `email` = xxx
你的用户模型 加入以下代码即可