承接 pieceofcake2/bake 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pieceofcake2/bake

最新稳定版本:v1.0.2

Composer 安装命令:

composer require pieceofcake2/bake

包简介

Bake plugin for CakePHP 2.x - Code generation tool

README 文档

README

GitHub License Packagist Version PHP CakePHP CI Codecov

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

Installation

Using Composer

Install the plugin using Composer:

composer require --dev pieceofcake2/bake

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

  • 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

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

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

  • PHP 8.0+
  • CakePHP 2.11+

License

MIT License

Support

统计信息

  • 总下载量: 2.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-05