Thursday, March 9, 2017

Allow login using username or email in Laravel 5.4

Now I've followed the Laravel documentation on how to allow usernames during authentication, but it takes away the ability to use the email. I want to allow users to use their username or email to login. How do I go about this?

I've added this code to the LoginController as per Laravel's Documentation.

public function username () {
    return 'username';
}



via Paul Lucero

Advertisement