Jabir bin Abdullah reported,

The Prophet ﷺ said, "Whoever eats from this plant, garlic," and on another occasion he said, "Whoever eats onions, garlic, and leeks, let him not come near our mosque, for the angels are troubled by what troubles the children of Adam."

Muslim 1254

Sahih

و حدثني محمد بن حاتم حدثنا يحيى بن سعيد عن ابن جريج قال أخبرني عطاء

عن جابر بن عبد الله

عن النبي ﷺ قال من أكل من هذه البقلة الثوم و قال مرة من أكل البصل والثوم والكراث فلا يقربن مسجدنا فإن الملائكة تتأذى مما يتأذى منه بنو آدم

مسلم 1254صحيح
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 1254
Muslim 1254