The Prophet (ﷺ) saw sputum on (the wall of) the mosque in the direction of the Qibla and scraped it off with gravel. Then he forbade Spitting in front or on the right, but allowed it on one's left or under one's left foot.
Reference: Sahih al-Bukhari 414 In-book : Book 8, Hadith 64 USC-MSA web (English) : Vol. 1, Book 8, Hadith 406 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.