Whenever the Prophet ﷺ returned from a journey and caught sight of the walls of Madinah, he would urge his mount to move faster, and if he was riding another animal, he would prod it forward out of his love for the city.
حدثنا سليمان أخبرنا إسماعيل قال أخبرني حميد
أن النبي ﷺ كان إذا قدم من سفر فأبصر جدران المدينة أوضع راحلته فإن كان على دابة حركها من حبها
Its isnad is sahih. Bukhari related the hadith in 3/9, in the chapter on Umrah, on hastening one's mount, and Tirmidhi related it in the chapter on supplications, on what one says upon returning from a journey, 5/499, no. 3441, and said, hasan sahih, and Baghawi related it in Sharh al-Sunnah 7/315, and Bayhaqi in 5/260.