Level 22
In AuthenticatesUsers.php trait, update username method to 'username':
public function username()
{
return 'username'; // was 'email'
}
Does it work?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I have succeeded replacing email for username in registration, but failed getting it working in login. It keeps asking for the email.
Do you know where should I change it ?
Thank you in advance.
In AuthenticatesUsers.php trait, update username method to 'username':
public function username()
{
return 'username'; // was 'email'
}
Does it work?
Please or to participate in this conversation.