So I have created an API endpoint (obviously not restful) that generates xml and returns the file path of the files. Its obviously more complicated but that is the gist.
My issues is this. Inside my controller I have all of this code that grabs information from the database (using models / relationships etc) and then generates the xml and I feel like this would be better abstracted out instead of cluttering up the controller.
So what do i do? I could easily put together a helper class that handles this all but everyone keeps telling me I should abstract it out into a Service. I've never done this successfully and I just kind of feel like its over-complicating my situation.
Which would be best practice? Is it a BAD practice to just create a helper class? Anyone have an "option C" suggestion?