I am starting my first REST based application and have probably a trivial question.
Example: Book resource:
1- GET www.domain.com/api/book/- receives all books (possible parameters in the body) 2- GET www.domain.com/api/book/1234 - receives details of the book instance with identifier = 1234 (without parameters in Tele) 3- GET GET www.domain.com/api/book/1234/author - gets the author of the book with ID = 1234
I'm curious about server-side implementation of these services. What PHP files will the corresponding code be stored in? Is there any kind of server configuration?
I assume that I will have a server folder structure like this: 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 is it somehow being processed by a script in api / book /?
Thanks and hi!
Where should I code the implementation
Aleks source share