It was narrated that Anas bin Malik said: “When the Messenger of Allah (ﷺ) was returning from the campaign of Tabuk, and had drawn close to Al-Madinah, he said: ‘In Al-Madinah there are people who, as you traveled and crossed valleys, were with you.’ They said: ‘O Messenger of Allah, even though they are in Al-Madinah?’ He said: ‘Even though they were in Al-Madinah. They were kept behind by (legitimate) excuses.’”
It was narrated from Jabir that the Messenger of Allah (ﷺ) said: “in Al-Madinah there are men who, every time you crossed a valley or travelled a road, they shared with you in the reward. They were kept behind by (legitimate) excuses.”