عن أنس بن مالك رضي الله عنه قال: كنَّا مع النبي صلى الله عليه وسلم في السفر فمنَّا الصائم، وَمِنَّا المُفطر، قال: فنزلنا مَنْزِلًا فِي يوم حارٍّ، وأكثرنا ظِلًّا صاحب الْكِسَاءِ، وَمِنَّا من يَتَّقِي الشمس بيده، قال: فَسقط الصُّوَّامُ، وقام المُفْطِرُونَ فَضربوا الْأَبْنِيَةِ، وَسَقَوْا الرِّكَاب، فقال رسول الله صلى الله عليه وسلم :"ذهب المُفْطِرُونَ اليوم بالأجر". [صحيح] - [متفق عليه] المزيــد ...
Anas ibn Mālik (may Allah be pleased with him) reported: We were with the Prophet (may Allah's peace and blessings be upon him) on a journey, and some of us were fasting and others were not. We stopped to rest in some place on a hot day. The one who had the largest share of shade among us was the one who had a garment. Some of us would shade themselves against the sun using their own hands. Those who were fasting fell to the ground, but those who were not fasting got up to pitch the tents and water the animals. Thereupon, the Messenger of Allah (may Allah’s peace and blessings be upon him) said: "Those who were not fasting today have taken all the reward." Sahih/Authentic. - [Al-Bukhari and Muslim]
The Companions of the Prophet (may Allah's peace and blessings be upon him) were with him during one of his journeys, and some of them were fasting, while others were not.
The Messenger of Allah (may Allah's peace and blessings be upon him) approved of the action of both parties.
On a hot day, they stopped in some place so as to have a rest from the hardship of travel and the scorching heat of noon time. Those who were fasting fell to the ground due to the heat and thirst, and were unable to do any work. Meanwhile, those who were not fasting pitched the tents, watered the camels, and served their fasting brothers. When the Messenger of Allah (may Allah's peace and blessings be upon him) saw this service that they provided the army with, he encouraged them and said: "Those who were not fasting today have taken all the reward.”