Narrated Muawiyah ibn Qurrah: The Messenger of Allah ﷺ forbade these two plants (i. e. garlic and onions), and he said: He who eats them should not come near our mosque. If it is necessary to eat them, make them dead by cooking, that is, onions and garlic.
Hadith Referenceسنن ابي داود / كتاب الأطعمة / 3827
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:إسناده حسن, مشكوة المصابيح (736)
Hadith Takhrij« تفرد بہ أبودواد، (تحفة الأشراف: 1180)، و قد أخرجہ: سنن النسائی/ الکبری (6681)، مسند احمد (4/19) (صحیح) »