Let’s say we have a User Model that has many Posts.
The Posts Model has many Categories
The Posts Model also has many Comments.
How do we find dynamically, the relationships that the User Model has?
The idea is to make an admin backend to a site, where I can have one function, that when passed a model, can retrieve all data related to that Object, and show it based on the found data’s relationship.
I’m guessing I need to access the Model Itself, and not an instance.
Any help would be appreciated, thank you.
I Finally did this, so here’s the code I used if anyone else wants it.
I make no claims to being a good programmer, I’m pretty new.
If someone actually was going to use this, and needed some help with my logic, I’ll comment it out fully, but I’m running on empty tonight…