(Imām Bukhārī narrates): Abu Ma'mar narrated to us, he said: Abdul Warith narrated to us from Abdul Aziz, he said that
a man asked Anas, may Allāh be pleased with him: What have you heard from the Prophet ﷺ regarding garlic? So he said: The Prophet ﷺ said: Whoever eats from this tree should not come near us, or he said: should not pray with us.
Reference: Sahih Al Bukhari 856