Anas bin Malik reported,

The Messenger of Allah ﷺ returned from the expedition of Tabuk, and as he drew near Madinah he said, "There are people in Madinah who were with you every step of the way and through every valley you crossed."They asked, "Messenger of Allah, even though they remained in Madinah?"He replied, "Yes, even though they remained in Madinah. A valid excuse kept them back."

Bukhari 4423

Sahih

حدثنا أحمد بن محمد أخبرنا عبد الله أخبرنا حميد الطويل

عن أنس بن مالك رضي الله عنه

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

البخاري 4423صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Descent of the Prophet ﷺ at Hijr
Numbering
Darussalam 4423
Bukhari 4423