cnizzardini/cakephp-rest-baker

The missing RESTful API component to CakePHP's bake console. Create RESTful API skeletions in seconds.


Keywords
CakePHP Rest, cakephp4 rest, cakephp rest bake, cakephp api bake, cakephp, cakephp-api, cakephp-bake, cakephp-plugin, cakephp-rest, cakephp4
License
MIT

Documentation

CakePHP REST Baker

Latest Version on Packagist License: MIT Build Status Coverage Status

The missing RESTful API component to CakePHP's bake console. Create RESTful API skeletons in seconds. This is very similar to https://github.com/cakephp/bake but it removes redirects, flash messages, and other code that is not applicable to API only projects. Deletes by default will return an HTTP 204.

Installation

composer require mixerapi/cakephp-rest-baker
bin/cake plugin load RestBaker

Alternatively after composer installing you can manually load the plugin in your Application:

# src/Application.php
public function bootstrap(): void
{
    // other logic...
    $this->addPlugin('RestBaker');
}

Usage

Add --theme RestBaker to your bake commands.

Examples:

bin/cake bake bake controller all --theme RestBaker
bin/cake bake controller {Name} --theme RestBaker

Unit Tests

vendor/bin/phpunit