If you do not use the ezadev-admin built-in authentication login logic, you can refer to the following way to customize the login authentication logic.
First of all, you need define a User provider, used to obtain the user identity, such as app/Providers/CustomUserProvider.php:
<?phpnamespaceApp\Providers;useIlluminate\Contracts\Auth\Authenticatable;useIlluminate\Contracts\Auth\UserProvider;classCustomUserProviderimplementsUserProvider{publicfunctionretrieveById($identifier) {}publicfunctionretrieveByToken($identifier, $token) {}publicfunctionupdateRememberToken(Authenticatable $user, $token) {}publicfunctionretrieveByCredentials(array $credentials) { // Use $credentials to get the user data, and then return an object implements interface `Illuminate\Contracts\Auth\Authenticatable`
}publicfunctionvalidateCredentials(Authenticatable $user,array $credentials) {// Verify the user with the username password in $ credentials, return `true` or `false` }}
In the methods retrieveByCredentials and validateCredentials the parameter $credentials is the user name and password array submitted on the login page, you can use $credentials to implement your own login logic.
The definition of interface Illuminate\Contracts\Auth\Authenticatable: