I want to write a class that I will use in the controllers to do certain tasks.
Like for example, the class X has functions that input data into different tables. So function addA inputs data from into table A and so forth.
I want multiple controller actions from different controller classes to call on functions from this class X.
What is the best way to do that? Should I make the class X a component?
i’m not quite sure what components are for actually.
any help would be appreciated (I’m a newbie).