We used to go for Military expeditions along with Allah's Messenger (ﷺ) and provide the people with water, serve them and bring the dead and the wounded back to Medina.
Sahih al-Bukhari Book 76, Hadith 2