The Messenger of Allah ﷺ went out to the Trench and found the Emigrants and the Helpers digging on a cold morning. They had no servants to do the work for them. When he saw the exhaustion and hunger they were enduring, he said, "O Allah, true life is the life of the Hereafter, so forgive the Helpers and the Emigrants."They answered him, saying, "We are the ones who pledged allegiance to Muhammad to strive in jihad as long as we live."
خرج رسول الله ﷺ إلى الخندق فإذا المهاجرون والأنصار يحفرون في غداة باردة، فلم يكن لهم عبيد يعملون ذلك لهم، فلما رأى ما بهم من النصب والجوع قال: اللهم إن العيش عيش الآخرة، فاغفر للأنصار والمهاجرة فقالوا مجيبين له: نحن الذين بايعوا محمدا على الجهاد ما بقينا أبدا.
Bukhari narrated it in the Book of Military Expeditions (4099) from Abdullah bin Muhammad, who said, Muawiya bin Amr told us, Abu Ishaq told us, from Humayd (he is al-Tawil), from Anas, and he mentioned it.Muslim narrated it in the Book of Jihad (130:1805) through another route from Anas, in shortened form.