1 month ago

How to change email field in login to username in laravel?

Posted 1 month ago by waltun

In my users table i have username insted of email and this is also in my register form.

I overwrite username method in AuthenticatesUsers trait in LoginController to this :

public function username()
    return 'username';

And in my blade the name of input is username.

Registration is working fine, but when i want to login, it says These credentials do not match our records.

Why i can't login ?

Please sign in or create an account to participate in this conversation.