Recently installed slim skeleton and I am curious about how the local data repository is used.
Basically, I am looking for a simple REST API build. I have it already built in Slim v3, but I like how the skeleton structure and routing is much more comprehensive than my simple Slim build years ago.
I see that it basically grabs the pre-defined data and loads it into the respective class (ie Users) as a example route.
Is this a necessary layer of abstraction if you are querying a db everytime?
Meaning is it necessary to create a “User” class with all the DB parameters and then query the DB, then update the class, etc. Or cant I just query the DB and have it JSON respond?