Reply to Weaning breastfed babies

I didn’t wean my first till he was 18 months old and I was pregnant with my second. I kinda just kept getting annoyed that he wanted to breasfeed all the time like a newborn and he would bite or just start to play and hitting me so one day I decided to slowly wean him by refusing the breast and offering regular cows milk before bed. We would lay down but he would look for my boobs and I would say no tomorrow in the morning. He cried but eventually went to sleep . Some days he would just not go to sleep without boob and some days he would. Then my husband helped out by putting him to sleep. I basically had to walk away and let my husband handle it.