Ibn 'Umar reported that Allah's Messenger (ﷺ) came to Quba' riding as well as on foot.
Sahih Muslim Book 15, Hadith 595