Overview

The easiest way to build a RESTful JSON API using PHP.

Features

  • Develop reusable Microservices.
  • Built with Domain Driven Design style
  • HATEOAS compliant
  • NoSQL enabled for BigData capability

Unlike traditional web frameworks which attempts to do everything, Restler Boot is a highly opinionated and is meant for a very specific use-case. Not only it targets purely RESTful JSON API, but it also attempts to structure your application with HATEOAS in mind.

The primary objects in Restler Boot are not the Models, View neither Controllers. Instead we had shifted it into Resource and Collections

A Resource is the object we want to expose in the API, this is usually represented by a single entity or table in the database. For example user, account, transaction and bank are all Resources.

A group of Resources is called Collection, this is usually represented as an array of JSON objects.

Whenever we need to perform any operation in resources (create,read,update,delete) it has to be in the form of HTTP verbs: PUT, GET, POST, DELETE. All other methods of manipulating data is strongly discouraged.

Operation HTTP Verb Sample URL
Create PUT http://api.example.com/banks
Read GET http://api.example.com/banks/123
Update POST http://api.example.com/banks
Delete DELETE http://api.example.com/banks/123

Installation

The framework can be installed via Composer. Simply execute the following command:
composer create-project buonzz/restler-boot myapi