We were with the Messenger of Allah ﷺ while he was digging the trench, and we were carrying away the soil. He passed by us and said, "O Allah, there is no life but the life of the Hereafter, so forgive the Ansar and the Muhajirah."
حدثنا محمد بن عبد الله بن بزيع حدثنا الفضيل بن سليمان حدثنا أبو حازم
كنا مع رسول الله ﷺ وهو يحفر الخندق ونحن ننقل التراب فيمر بنا فقال اللهم لا عيش إلا عيش الآخره فاغفر للأنصار والمهاجره
Bukhari also reported it in the chapter on health and free time, and that there is no life except the life of the hereafter (Riqaq), hadith 6414, from the hadith of Fudayl bin Sulayman, with the same wording. Muslim also reported it, hadith 1804, through another route from Abu Hazim, with the same wording.There is also a report on this topic from Anas bin Malik [to come: 3857].