Laravel: Using multiple columns for authentication
问题 I have a Laravel 6 application. In a typical application, the user would just specify their email , where the email is unique. However, in my application, I have 2 columns in the User model that is used to authenticate users. app_id email unique(app_id, email) So in order to login, we need to pass both an app_id and an email , along with the password . The same email could be used across different app_id s. How would I achieve this? 回答1: The default login actions provided by Auth::routes()