Firstly, apologies for the title of this post - I didn’t know what else to put, but I do think it describes my issue quite well.
So, I’m building something and I’m not sure how I should be approaching it, and still utilise October’s powerful backend list/form features…
I want to have a “Resource” area in the backend and frontend. Resources can be one of many types, for example video, report and case study.
Each “type” will have some unique properties, but they will also share some common properties too such as a title and published_date.
I know there are probably a few ways this could be done.
The easiest would probably be to have just one Resource model, and store all resources in the same table - and only fill the columns that are needed for that particular resource type.
Second option is to have separate models for each resource type, but I think this is going to get a bit dirty when trying to combine everything together into a backend list and trying to use the filter features.
I’m wondering if there’s something I could do with a trait, or a parent model that has a polymorphic relation to each resource type - something like that.
If anyone has any good ideas on how I should approach this I’d really appreciate it.