App\Services\Auth\User::findByToken PHP Method

findByToken() public static method

public static findByToken ( string $token ) : User | null
$token string
return 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();
    }