Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Whoever eats from this plant should not come near our mosque, nor disturb us with the smell of garlic."

Muslim 1251

Sahih

و حدثني محمد بن رافع وعبد بن حميد قال عبد أخبرنا وقال ابن رافع حدثنا عبد الرزاق أخبرنا معمر عن الزهري عن ابن المسيب

عن أبي هريرة قال

قال رسول الله ﷺ من أكل من هذه الشجرة فلا يقربن مسجدنا ولا يؤذينا بريح الثوم

مسلم 1251صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Prohibition on those who have eaten garlic, onions, leeks, or similar from attending the masjid
Numbering
Darussalam 1251
Muslim 1251