PHPackages                             pieceofcake2/bake - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pieceofcake2/bake

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

pieceofcake2/bake
=================

Bake plugin for CakePHP 2.x - Code generation tool

v1.0.2(7mo ago)02.4k↓50%1MITPHPPHP &gt;=8.0CI passing

Since Oct 6Pushed 7mo agoCompare

[ Source](https://github.com/pieceofcake2/bake)[ Packagist](https://packagist.org/packages/pieceofcake2/bake)[ RSS](/packages/pieceofcake2-bake/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (1)

Bake Plugin for CakePHP 2.x
===========================

[](#bake-plugin-for-cakephp-2x)

[![GitHub License](https://camo.githubusercontent.com/b3978cd84984fb2c1016165b5fe15316e09c88eabe0c4360be4eb6e12f972f2f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70696563656f6663616b65322f62616b653f6c6162656c3d4c6963656e7365)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/e3de44ae58416a70b57007db6a0d9c16c48febc50317cbacef28ca1e03a29b5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70696563656f6663616b65322f62616b653f6c6162656c3d5061636b6167697374)](https://packagist.org/packages/pieceofcake2/bake)[![PHP](https://camo.githubusercontent.com/838ce483dcd2e82c584df50dd9b3ff6e3215406b5f0c42e7269cd83933f2d809/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f62616b652f7068703f6c6f676f3d706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d504850266c6162656c436f6c6f723d25323337373742423426636f6c6f723d253233464646464646)](https://camo.githubusercontent.com/838ce483dcd2e82c584df50dd9b3ff6e3215406b5f0c42e7269cd83933f2d809/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f62616b652f7068703f6c6f676f3d706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d504850266c6162656c436f6c6f723d25323337373742423426636f6c6f723d253233464646464646)[![CakePHP](https://camo.githubusercontent.com/70e3882d810fd87ebde41e40494cc907da5b08b7e1833875278b2d6cfe977080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f62616b652f70696563656f6663616b65322f63616b657068703f6c6f676f3d63616b65706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d43616b65504850266c6162656c436f6c6f723d25323344333343343326636f6c6f723d253233464646464646)](https://camo.githubusercontent.com/70e3882d810fd87ebde41e40494cc907da5b08b7e1833875278b2d6cfe977080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f62616b652f70696563656f6663616b65322f63616b657068703f6c6f676f3d63616b65706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d43616b65504850266c6162656c436f6c6f723d25323344333343343326636f6c6f723d253233464646464646)[![CI](https://camo.githubusercontent.com/64f23afeb5463fb98d40751ceedac58fa002b9f31ca4526bea1408ffe92caa6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70696563656f6663616b65322f62616b652f43492e796d6c3f6c6162656c3d4349)](https://github.com/pieceofcake2/bake/actions/workflows/CI.yml)[![Codecov](https://camo.githubusercontent.com/7ff85e93acf92d8361c1625bda9e81e497927347cd65b2c1c27088cdaca037d5/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f70696563656f6663616b65322f62616b653f6c6162656c3d436f766572616765)](https://codecov.io/gh/pieceofcake2/bake)

The Bake plugin provides code generation and scaffolding capabilities for CakePHP 2.x applications.

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

[](#installation)

### Using Composer

[](#using-composer)

Install the plugin using Composer:

```
composer require --dev pieceofcake2/bake
```

Usage
-----

[](#usage)

Once installed, you can use the bake commands:

```
# Bake a model
app/Console/cake bake model User

# Bake a controller
app/Console/cake bake controller Users

# Bake views
app/Console/cake bake view Users

# Bake everything for a model
app/Console/cake bake all User

# Create a new project
app/Console/cake bake project /path/to/new/project

# Create a new plugin
app/Console/cake bake plugin MyPlugin
```

Features
--------

[](#features)

- **Model Generation**: Create models with associations and validation
- **Controller Generation**: Create controllers with CRUD actions
- **View Generation**: Create views for index, view, add, and edit actions
- **Test Generation**: Create test cases for your code
- **Fixture Generation**: Create fixtures for testing
- **Plugin Generation**: Scaffold new plugins
- **Project Generation**: Create new CakePHP projects
- **Custom Templates**: Use custom bake templates for code generation

Bake Templates
--------------

[](#bake-templates)

The Bake plugin uses templates for code generation. You can customize these templates by creating your own bake theme.

### Custom Bake Themes

[](#custom-bake-themes)

Create a directory structure in your app:

```
app/Console/Templates/myTheme/
├── classes/
│   ├── controller.ctp
│   ├── model.ctp
│   └── fixture.ctp
└── views/
    ├── index.ctp
    ├── view.ctp
    └── form.ctp

```

Then use your theme:

```
app/Console/cake bake controller Users --theme myTheme
```

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

[](#requirements)

- PHP 8.0+
- CakePHP 2.11+

License
-------

[](#license)

MIT License

Support
-------

[](#support)

- Issues:
- Documentation:

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance64

Regular maintenance activity

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

4

Last Release

220d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

1.x-devPHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578548?v=4)[TSURU](/maintainers/ttsuru)[@ttsuru](https://github.com/ttsuru)

---

Top Contributors

[![ttsuru](https://avatars.githubusercontent.com/u/578548?v=4)](https://github.com/ttsuru "ttsuru (11 commits)")

---

Tags

scaffoldingcakephpbakecode-generationcakephp2

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pieceofcake2-bake/health.svg)

```
[![Health](https://phpackages.com/badges/pieceofcake2-bake/health.svg)](https://phpackages.com/packages/pieceofcake2-bake)
```

###  Alternatives

[friendsofcake/crud

CakePHP Application development on steroids - rapid prototyping / scaffolding &amp; production ready code - XML / JSON APIs and more

3751.4M25](/packages/friendsofcake-crud)[friendsofcake/crud-view

View layer for CRUD

52433.8k2](/packages/friendsofcake-crud-view)[dereuromark/cakephp-url-cache

CakePHP plugin to speed up URL reverse lookup

24117.2k](/packages/dereuromark-cakephp-url-cache)[loadsys/cakephp_sitemap

A CakePHP Plugin for adding automatic XML and HTML Sitemaps to an app

2819.6k](/packages/loadsys-cakephp-sitemap)[tigrang/cakephp-datatable

CakePHP DataTable Plugin

465.1k](/packages/tigrang-cakephp-datatable)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

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