CakePHP モデルを作成する
bake コマンドを実行する。
$ bake
bake メニューで m を入力する。
Welcome to CakePHP v1.2.3.8166 Console --------------------------------------------------------------- App : shopping2 Path: C:/core/work/shopping2 --------------------------------------------------------------- Interactive Bake Shell --------------------------------------------------------------- [D]atabase Configuration [M]odel [V]iew [C]ontroller [P]roject [Q]uit What would you like to Bake? (D/M/V/C/P/Q) > m
データベースに存在するテーブルを元にモデルの一覧が表示される。
一覧から作成したモデルを番号で指定する。
--------------------------------------------------------------- Bake Controller Path: C:/core/work\PROJECT-NAME\controllers\ --------------------------------------------------------------- Possible Models based on your current database: 1. Category 2. Product Enter a number from the list above, type in the name of another model, or 'q' to exit > 1