Anas bin Malik reported,

The companions of the Prophet ﷺ were chanting as they dug the trench, "We are the ones who pledged allegiance to Muhammad upon Islam, for as long as we live."The Prophet ﷺ would respond, "O Allah, there is no good except the good of the Hereafter, so forgive the Ansar and the Muhajirin."Then barley bread and rancid fat were brought to the Messenger of Allah ﷺ, and they ate from it. The Prophet ﷺ said, "Truly, the only good is the good of the Hereafter."

Ahmad 14068

Sahih

حدثنا عفان حدثنا حماد قال أخبرنا ثابت

عن أنس

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

أحمد 14068صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 14068
Ahmad 14068