I am creating a web app that will:
- Take parameters in a form submission
- Run an action which will query an api to retrieve report data based on those parameters
- Save that report as a file along with user data (user name, id, member path, and time of submission) as an entry to a database
- List those entries (along with links to download the files)
I have an idea about how to approach this but I wanted to check here to see if I'm on or off base before getting too deep into it. As of right now I have the first two items working well enough for testing: I can query the API and get the user data I need. It's the CRUDL best practices that I'm interested in learning for this question.
My thinking is that I would save this data as a channel entry and then list out the entries using the standard channel template tags. In other words, when someone makes a form submission it will validate and save that data and file as a channel entry.
What's the best way of going about this? Should I create a channel in the control panel Channel Manger and a corresponding directory in the File Manger and use the db helper to insert, edit, and delete those items in my action method?