laravel 5.1 中用户模型的 getAuthPassword 定义在哪里?

Pan*_*kaj 1 php laravel-5 laravel-5.1

我现在在文件中:

\vendor\laravel\framework\src\Illuminate\Auth\EloquentUserProvider.php

功能:验证凭证

有下面提到的代码

return $this->hasher->check($plain, $user->getAuthPassword());
Run Code Online (Sandbox Code Playgroud)

我试图找出为什么 的值为$user->getAuthPassword()空,这就是我想知道这个函数的定义位置的原因。

cee*_*yoz 7

这是一个非常简单的函数Illuminate\Auth\Authenticatable

public function getAuthPassword()
{
    return $this->password;
}
Run Code Online (Sandbox Code Playgroud)

它将获取您的用户模型的(散列)密码。