Abu Saeed Khudri reported,

The Messenger of Allah ﷺ passed by a field of onions along with his companions. Some of them dismounted and ate from it, while others did not. Then we went to him in the evening, and he called forward those who had not eaten the onions and kept the others back until the smell had gone.

Azami 7406

Sahih

عن أبي سعيد الخدري

أن رسول الله ﷺ مر على زراعة بصل هو وأصحابه، فنزل ناس منهم فأكلوا منه، ولم يأكل آخرون، فرحنا إليه، فدعا الذين لم يأكلوا البصل، وأخر الآخرين حتى ذهب ريحها.

الأعظمي 7406صحيح
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 7406 (2nd edition)
Azami 7406