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