How to use LEDC example to control multiple GPIOs in ESPHome for ESP32?

I am using LEDC example for dimming the LED light on single GPIO (This is the example I’m using). But now I want to implement same for multiple GPIOs on single ESP32. I have to control PWM on 8 GPIOs of ESP32. Any better way to implement it?