Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ionelfona's avatar

Are "helper classes" a viable solution for this particular case?

So there is a particular check that I need to do in some views and in a controller (gets the user vote on a post, which can be negative or positive), is it a good practice to make a "helper class" with static methods (stored in App\Helpers) that I can call from anywhere or is there a better alternative? @jeff_way I'm looking at you for this since you're the "whipping monstrous code into shape" expert. :)

0 likes
0 replies

Please or to participate in this conversation.