PHPackages                             baserproject/bc-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. baserproject/bc-bake

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

baserproject/bc-bake
====================

baserCMSの管理画面の scaffold を作成するプラグイン

1.2.1(yesterday)11↑2900%2MITTwig

Since Jun 27Pushed yesterdayCompare

[ Source](https://github.com/baserproject/BcBake)[ Packagist](https://packagist.org/packages/baserproject/bc-bake)[ RSS](/packages/baserproject-bc-bake/feed)WikiDiscussions 1.1.x Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

BcBake plugin for baserCMS
==========================

[](#bcbake-plugin-for-basercms)

baserCMSのスキャッフォルドを作成するためのプラグインです。
CakePHPの bake コマンドを拡張して、baserCMSのプラグインやテーマを作成するためのコマンドを提供します。

プラグインの作成
--------

[](#プラグインの作成)

プラグインを作成するためのコマンドは次の通りです。

```
bin/cake bake bc_plugin {PluginName}
```

`bake bc_plugin` コマンドは、CakePHPが提供する `bake plugin` コマンドが生成するファイルに加えて次のファイルを生成します。
これによりすぐに baserCMSにインストール可能となります。

- `config.php`
- `config/setting.php`
- `src/ServiceProvider/PluginNameServiceProvider.php`
- `src/Event/PluginNameControllerEventListener.php`
- `src/Event/PluginNameModelEventListener.php`
- `src/Event/PluginNameViewEventListener.php`
- `src/Event/PluginNameHelperEventListener.php`
- `src/View/Helper/PluginNameBaserHelper.php`

不要なファイルは削除しましょう。

MVCに関連するファイルの作成
---------------

[](#mvcに関連するファイルの作成)

MVCに関連するファイルを作成するためのコマンドは次の通りです。

```
bin/cake bake bc_all {table_name} -p {PluginName} --prefix Admin
```

`bake bc_all` コマンドは、CakePHPが提供する `bake all` コマンドが生成するファイルに加えて次のファイルを生成します。

- `src/Service/TableNameService.php`
- `src/Service/TableNameServiceInterface.php`
- `src/Service/Admin/TableNameAdminService.php`
- `src/Service/Admin/TableNameAdminServiceInterface.php`

サービスクラスを利用するには、サービスプロバイダに登録が必要となります。

```
// src/ServiceProvider/PluginNameServiceProvider.php

use PluginName\Service\Admin\TableNameAdminService;
use PluginName\Service\Admin\TableNameAdminServiceInterface;

class PluginNameServiceProvider extends ServiceProvider
{

// provides プロパティにインターフェイスを定義
protected array $provides = [
    TableNameAdminServiceInterface::class,
];

// services メソッドにインターフェイスと実装クラスの関連付けを登録
public function services($container): void
{
    $container->defaultToShared(true);
    $container->add(TableNameAdminServiceInterface::class, TableNameAdminService::class);
}
```

ユニットテスト
-------

[](#ユニットテスト)

ユニットテストについては、次を参考にします。

- [独自プラグインのユニットテスト](https://baserproject.github.io/5/plugin/unittest)

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.5% 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

3

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fde032c594b68cb7359d0991388bfb4cc1b8083b45d120aa0c1cd5d46285b1e6?d=identicon)[baserproject](/maintainers/baserproject)

---

Top Contributors

[![ryuring](https://avatars.githubusercontent.com/u/90106?v=4)](https://github.com/ryuring "ryuring (52 commits)")[![binbin4649](https://avatars.githubusercontent.com/u/633576?v=4)](https://github.com/binbin4649 "binbin4649 (3 commits)")

### Embed Badge

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

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

###  Alternatives

[eve/dto

Simplistic, flexible Data Transfer Object library

1214.8k](/packages/eve-dto)[elegantly/laravel-kpi

Advanced KPI for your Laravel application

174.4k1](/packages/elegantly-laravel-kpi)

PHPackages © 2026

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