Ibn 'Abbas reported that Allah's Messenger (ﷺ) stayed in Makkah for fifteen years (after his advent as a Prophet) and he heard the voice of Gabriel (ؑ) and saw his radiance for seven years but did not see any visible form, and then received revelation for ten years, and he stayed in Madinah for ten years.