You don't stop your dog from panting, dogs lack sweat glands and they have to pant to get rid of excess body heat and salt. Not allowing your dog to pant could lead to devastating effects. You can help cool him down but dogs always need to pant to get rid of excessive salt and other minerals in the body by collecting it in the airways and then releasing it into the air through panting
Be sure the dog has some shade. You can take him into the house where it is cooler. You can also use the water hose to run water on the dog to cool him down or if you have a big tub with cool water in it that you can put the dog into, that will help. Dogs can have heat strokes and can die from over-heating. Be sure your animal has cool water to drink and a shade.