how to overwrite laravel's login method, I want to add a universal key, to be able to enter the accounts of system users.
After making the login attempt and if it does not match the credentials of the database, make another attempt with a universal password that is in the code.
I think it is here (EloquentUserProvider) where the validation of credentials is done, but I do not know how to customize it so that it works as I wish.
public function validateCredentials(UserContract $user, array $credentials)
{
$plain = $credentials['password'];
return $this->hasher->check($plain, $user->getAuthPassword());
}
I´m usising laravel 5.6