Jabir bin Abdullah reported,

The Messenger of Allah ﷺ forbade eating onions and leeks, but need overcame us and we ate some of them. He then said, "Whoever eats from this foul-smelling plant should not come near our mosque, for the angels are offended by what offends humans."

Azami 7403

Sahih

عن جابر قال

نهى رسول الله ﷺ عن أكل البصل والكراث، فغلبتنا الحاجة فأكلنا منها، فقال: من أكل من هذه الشجرة المنتنة فلا يقربن مسجدنا؛ فإن الملائكة تتأذى مما تتأذى منه الإنس.

الأعظمي 7403صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Foods
Chapter
Foods other than meat
Section
Eating garlic, onions, and leeks
Numbering
Jami al-Kamil 7403 (2nd edition)
Azami 7403