App\Services\Auth\User::findByToken PHP 메소드

findByToken() 공개 정적인 메소드

public static findByToken ( string $token ) : User | null
$token string
리턴 User | null
    public static function findByToken(string $token)
    {
        $resetRecord = app('db')->table('password_resets')->where('token', $token)->first();
        if (empty($resetRecord)) {
            return;
        }
        return static::where('email', $resetRecord->email)->first();
    }