Sahih Bukhari – Hadith No : 4149

Narrated Anas: Allah’s Apostle went out towards the Khandaq (i.e. Trench) and saw the Emigrants and the Ansar digging the trench in the cold morning. They had no slaves to do that (work) for them. When the Prophet saw their hardship and hunger, he said, ‘O Allah! The real life is the life of the Hereafter, so please forgive Ansar and the Emigrants.” They said in reply to him, “We are those who have given the Pledge of allegiances to Muhammad for to observe Jihad as long as we live.”

Hadith In Arabic Text :

حدثنا عبد الله بن محمد، حدثنا معاوية بن عمرو، حدثنا أبو إسحاق، عن حميد، سمعت أنسا رضى الله عنه يقول خرج رسول الله صلى الله عليه وسلم إلى الخندق، فإذا المهاجرون والأنصار يحفرون في غداة باردة، فلم يكن لهم عبيد يعملون ذلك لهم، فلما رأى ما بهم من النصب والجوع قال ‏”‏ اللهم إن العيش عيش الآخره فاغفر للأنصار والمهاجره ‏”‏ فقالوا مجيبين له نحن الذين بايعوا محمدا على الجهاد ما بقينا أبدا

Chapter : Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi) – كتاب المغازى