I am starting my first REST-based application and have a probably trivial question.
Example: a resource "Book":
1- GET www.domain.com/api/book/ - gets all the Books (possible parameters in body) 2- GET www.domain.com/api/book/1234 - gets the detailes of the Book instance with the ID=1234 (no params in body) 3- GET GET www.domain.com/api/book/1234/author - gets the Author of the book with the ID=1234
I am wondering about the physical server side implementation of these services. In which PHP files will the corresponding code be stored? Is there some server configuration to be done?
I guess I will have a server folder structure similar to this one: api/book/ api/author/
...and some php files inside: api/book/file.php api/author/file.php
Should I also have a physical folder api/book/1234 or it is somehow asumed to be handled by the script in api/book/?
Thankys and regards!
Where should I code the implementation of the