In the manual I can read:
By default, Laravel uses the email field for authentication. If you would like to customize this, you may define a
usernamemethod on yourLoginController
However in my case I would like to use the unique_id field which is provided by my company to authenticate my user. This field is not a username so I feel bad about using the username() method to get this. Is there another way to tell Laravel Authentication to use something else than email to authentify my users?
make:auth?username()method, you just make it returnunique_idinstead ofusername. That method simply tells the auth what column to use if you don't plan on using the default.username()method's name is quite unfortunate, but that's the way to go.usernameI will get a confused result which is not the username but an id.