Live Examples

Luracast Restler 3 is a micro-framework that can expose any PHP class (with zero arguments constructor) and its public and protected methods (that manage their own dependencies) as RESTful API.

Learn by the examples

Here you can find the examples that shows many features of Restler and how to use them. It is created in such a way that they can be tested on your local host. You can check the source code, try some of the API's exposed all at the comfort of your browser.

  1. Hello World Let's say hello!  1
  2. Minimal Less is more  2
  3. Multi-format Serving what the client wants  3
  4. Error Response Making use of HTTP status codes  4
  5. Protected API Creating restricted zone  5
  6. Routing Ways to map api methods to url  6
  7. CRUD using POST, GET, PUT and DELETE  7
  8. Documentation Commenting can be more rewarding  8
  9. Rate Limiting Abuse no more  9
  10. Access Control Who can do what  10
  11. Vendor MIME custom media type for versioning  11
  12. Html Format rendering custom views  12
  13. OAuth2 Client to consume protected API  13
  14. OAuth2 Server offering protected API  14
  15. Forms to capture user input  15

Restler Flow Diagram Restler Execution Flow