log in using username or email in laravel 8 code example
Example: laravel using username instead of email
All we need is add a method in app/Http/Controllers/Auth/LoginController.php:
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return 'username';
}