She visited Germany last summer.
What is the grammatical function of the underlined phrase?
The underlined phrase "last summer" is an adverbial phrase of time. It tells us when the action of the verb "visited" occurred.