Imam Bukhari narrates: Yahya bin Bukair narrated to us the hadeeth, he said: Laith narrated to us the hadeeth, from 'Uqail, from Ibn Shihab, from Humaid bin 'Abdur Rahman, that Hazrat Abu Hurairah and Hazrat Abu Sa'eed (may Allāh be pleased with them both) informed that
the Messenger of Allāh ﷺ saw phlegm on the wall of the mosque, so he took a pebble and scraped it off, then he said: When any one of you spits phlegm, let him not spit in front of his face, nor towards his right side, but rather let him spit towards his left side or under his left foot.
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ، أَنَّ أَبَا هُرَيْرَةَ، وَأَبَا، سَعِيدٍ أَخْبَرَاهُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى نُخَامَةً فِي حَائِطِ الْمَسْجِدِ، فَتَنَاوَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم حَصَاةً فَحَتَّهَا ثُمَّ قَالَ " إِذَا تَنَخَّمَ أَحَدُكُمْ فَلاَ يَتَنَخَّمْ قِبَلَ وَجْهِهِ وَلاَ عَنْ يَمِينِهِ، وَلْيَبْصُقْ عَنْ يَسَارِهِ، أَوْ تَحْتَ قَدَمِهِ الْيُسْرَى ".
Reference: Sahih Al Bukhari 410