A skeleton for creating API applications.
A skeleton for creating API applications with CakePHP 3.x.
This Application is a starting point for creating an API to be consumed from other apps. It includes a basic MySQL script for the User’s table.
composer self-update
.php composer.phar create-project --prefer-dist cakephp/app [app_name]
.If Composer is installed globally, run
composer create-project --prefer-dist cakephp/app
In case you want to use a custom app dir name (e.g. /myapp/
):
composer create-project --prefer-dist cakephp/app myapp
You can now either use your machine’s webserver to view the default home page, or start
up the built-in webserver with:
bin/cake server -p 8765
Then you can start using the API calling these endpoints:
POST http://localhost:8765/api/users/login
POST http://localhost:8765/api/users
GET http://localhost:8765/api/users/{id}