My dog constantly chews at people’s feet whether shoes on or off

My dog chews on laces and socks and won’t let go unless he gets distracted (with a treat) this often leads to him being dragged around starched to our feet not wanting to let go, is there anyway to prevent him from eating feet whilst we’re walking or to stop him doing so entirely? Thank you in advance