protected function getTokenFromRequest(Request $request)
    {
        $token = $request->input($this->token) ?: $request->header($this->csrfHeader);

        if (! $token && $header = $request->header($this->xsrfHeader)) {
            $token = $this->encrypter->decrypt($header, static::serialized());
        }

        return $token;
    }