守着一只汪
默认是使用eloquent作为认证驱动器,所以看看Illuminate\Auth\EloquentUserProvider里面的实现public function validateCredentials(UserContract $user, array $credentials){$plain = $credentials['password'];return $this->hasher->check($plain, $user->getAuthPassword());}所以如果要改验证的逻辑,可以继承原有的驱动器,然后重写validateCredentials里面的逻辑class TestUserProvider extend EloquentUserProvider{public function validateCredentials(UserContract $user, array $credentials){$plain = $credentials['password'];return md5($plain) == $user->getAuthPassword();}}最后设置驱动器,建议加载AppServiceProvider的boot()里面Auth::setProvider(new TestUserProvider());