From Sahih Bukhari (Hadith 6414):
Narrated Sahl bin Sa`d As-Sa`idi:We were in the company of Allah's Messenger (ﷺ) in (the battle of) Al-Khandaq, and he was digging the trench while we were carrying the earth away. He looked at us and said, "O Allah! There is no life worth living except the life of the Hereafter, so (please) forgive the Ansar and the Emigrants
Reference: Bukhari 6414