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 and it only allows username for login. I want it to accept username or email for login. public function username () { return 'username'; } Follow instructions from this link: https://laravel.com/docs/5.4/authentication#authenticating-users Then you can check for the user input like this $username