bakeコマンド

ヘルプ

[text]cake bake -h[/text]

bake

[text]cake bake[/text]

オール作成

[text]cake bake all[/text]

「D」――データベース設定を作成
「M」――モデルの作成
「V」――ビューの作成
「C」――コントローラーの作成
「P」――プロジェクトを作成します。
「F」――フィクスチャ(テスト用データベースデータ)を作成
「T」――テストの作成
「Q」――プログラムを終了

まずモデル

どのモデルを作成しますか?

[text]Possible Models based on your current database:
1. User
Enter a number from the list above,
type in the name of another model, or ‘q’ to exit
[q] > [/text]

バリデーションの設定[テーブルに用意されている1つずつの項目にバリデーションを設定するか?]

[text]Would you like to supply validation criteria
for the fields in your model? (y/n)
[y] > [/text]

どういう連携処理をどのモデルと行うか

[text]Would you like to define model associations
(hasMany, hasOne, belongsTo, etc.)? (y/n)
[y] > [/text]

設定の確認画面

[text]——————————————————
The following Model will be created:
——————————————————
Name: User
DB Table: `users`
——————————————————
Look okay? (y/n)
[y] >[/text]

ユニットテストを作成するか?

[text]PHPUnit is not installed. Do you want to bake unit test files anyway? (y/n)
[y] >[/text]

次にコントローラー

どのModelを使用しコントローラーを作成するか?
[text]ossible Controllers based on your current database:
1. Mydatas
Enter a number from the list above,
type in the name of another controller, or ‘q’ to exit
[q] > [/text]

対話形式でControllerを作っていくか?
[text]——————————————————
Baking MydatasController
——————————————————
Would you like to build your controller interactively? (y/n)
[y] >[/text]

「scaffolding」スカフォウドを使うか?
[text]Would you like to use dynamic scaffolding? (y/n)
[n] >[/text]

「index」「add」「viiew」「edit」を作成するか?
[text]Would you like to create some basic class methods
(index(), add(), view(), edit())? (y/n)
[n] > [/text]

アドミン・ルーティングを作成するか?
[text]Would you like to create the basic class methods for admin routing? (y/n)
[n] >[/text]

Html HelperとForm Helper以外のヘルパーを使うか?
[text]Would you like this controller to use other helpers
besides HtmlHelper and FormHelper? (y/n)
[n] >[/text]

他のコンポーネントを使うか?
[text]Would you like this controller to use any components? (y/n)
[n] >[/text]

フラッシュメッセージを使うか?
[text]Would you like to use Session flash messages? (y/n)
[y] >[/text]

確認画面
[text]——————————————————
The following controller will be created:
——————————————————
Controller Name:
Users
——————————————————
Look okay? (y/n)
[y] >[/text]

Viewの作成

どのビューを作成するか?
[text]Bake View
Path: …Viewのパス…

Possible Controllers based on your current database:
1. Users
Enter a number from the list above,
type in the name of another controller, or ‘q’ to exit
[q] > [/text]

対話形式で作成するか?
[text]Would you like bake to build your views interactively?
Warning: Choosing no will overwrite Mydatas views if it exist. (y/n)
[n] > [/text]

CRUDのViewを作るか(Create/Read/Update/Deleteの略)Controllerに用意したこれらの機能のためのViewを自動生成
[text]Would you like to create some CRUD views
(index, add, view, edit) for this controller?
NOTE: Before doing so, you’ll need to create your controller
and model classes (including associated models). (y/n)
[y] >[/text]

アドミン・ルーティングのViewを作るか?
[text]Would you like to create the views for admin routing? (y/n)
[n] >[/text]

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です