It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) noticed the smell of garlic in the mosque, so he (peace and blessings be upon him) said: "Whoever has eaten anything of this plant must not come near our mosque."
Hadith Referenceمسند أبي يعلى الموصلي / مسند أبي هريرة رضي الله عنه / 5916
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«حکم الحدیث مسند ابی یعلی محققاً تنسیق حسين سليم أسد - مکتبہ شاملہ :قال حسين سليم أسد: إسناده حسن . » «قال سعيد بن محمد السناري: صحيح» «أخرجه سنن ابن ماجه برقم: 1015، وأخرجه مسند أحمد برقم: 9260، وأخرجه مسند البزار برقم: 2905، مسند ابویعلیٰ ترقیم الاثری: 5890»