Ibn Umar (Allah be pleased with them) reported that Messenger of Allah ﷺ came to the mosque at Quba' riding and on foot, and he observed two rak'ahs of (Nafl prayer) in it. (Using translation from Muslim 1399b)
كَانَ رَسُولُ اللهِ ﷺ يَأْتِي مَسْجِدَ قُبَاءَ رَاكِبًا وَمَاشِيًا