I am fairly new to PHP (about 8 months). I am building a web app, which is almost ready for beta. I am only now starting to think about what I would need to do to make a mob
There are also tools that create a REST api from the DB without the need for extra code.
If you are using Postgres there is the excellent program postgREST that
serves a fully RESTful API from any existing PostgreSQL database. It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.