PHPackages                             berrygoudswaard/cakephp-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. berrygoudswaard/cakephp-api

ActiveCakephp-plugin[API Development](/categories/api)

berrygoudswaard/cakephp-api
===========================

4.2.0(4y ago)01.8kMITPHP

Since Jul 27Pushed 4y ago2 watchersCompare

[ Source](https://github.com/berrygoudswaard/cakephp-api)[ Packagist](https://packagist.org/packages/berrygoudswaard/cakephp-api)[ RSS](/packages/berrygoudswaard-cakephp-api/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

CakePHP API Component
=====================

[](#cakephp-api-component)

This plugin contains a component that make it easier to create API output with CakePHP

Requirements
------------

[](#requirements)

- CakePHP 3.1+

Installation
------------

[](#installation)

```
composer require berrygoudswaard/cakephp-api
```

Usage
-----

[](#usage)

In your app's `config/bootstrap.php` add:

```
Plugin::load('BerryGoudswaard/Api');
```

Then load the component where you need it by adding the following code to your controller:

```
$this->loadComponent('BerryGoudswaard/Api.Api', [
    'cors' => [
        'allowHeaders' => ['Content-Type', 'Authorization'],
        'allowMethods' => ['GET', 'POST', 'PUT', 'DELETE'],
        'allowOrigins' => ['http://localhost:4200', 'http://www.berrygoudswaard.nl'],
        'allowCredentials' => 'true',
    ]
]);
```

Output data
-----------

[](#output-data)

```
public function index()
{
    $tags = $this->Tags->find();

    $this->Api->addData('tags', $tags);
    return $this->Api->output();
}
```

The code above will output something like:

```
{
    "message": "OK",
    "code": 200,
    "data": {
        "tags": {
            "items": [
                {
                    "id": 1,
                    "tag": "cakephp"
                }, {
                    "id": 2,
                    "tag": "plugin"
                }
            ]
        }
    }
}
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity67

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~308 days

Recently: every ~374 days

Total

6

Last Release

1721d ago

Major Versions

0.1.0 → 4.2.02021-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/3524696a5bc9f792501513f35377bbf68e38e27a44888ea761f6d922d1fa4a98?d=identicon)[berrygoudswaard](/maintainers/berrygoudswaard)

---

Tags

apicakephp

### Embed Badge

![Health badge](/badges/berrygoudswaard-cakephp-api/health.svg)

```
[![Health](https://phpackages.com/badges/berrygoudswaard-cakephp-api/health.svg)](https://phpackages.com/packages/berrygoudswaard-cakephp-api)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

333972.2k49](/packages/dereuromark-cakephp-tools)[friendsofcake/crud-json-api

Listener for building CakePHP Crud APIs following the JSON API specification.

57456.1k3](/packages/friendsofcake-crud-json-api)[bcrowe/cakephp-api-pagination

CakePHP 4 plugin that injects pagination information into API responses.

3954.0k2](/packages/bcrowe-cakephp-api-pagination)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

35184.7k2](/packages/dereuromark-cakephp-setup)[mixerapi/mixerapi

Streamline development of API-first applications in CakePHP

4443.0k](/packages/mixerapi-mixerapi)[a2design-company/mandrill-cakephp-plugin

Mandrill CakePHP plugin

193.2k](/packages/a2design-company-mandrill-cakephp-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
