Some quick tip to use cake bake
In normal, you will type :
$cake bake
After that, you will answer each question of cake bake as what do you generate (D/M/V/C/P/Q …) … how to gen.
We have a quickly statement to do that :
- Want to direct generate models
$cake bake model
- Want to direct generate controller
$cake bake controller
- Want to direct generate view
$cake bake view
- Want to direct generate models with name
$cake bake model model_name
- Want to direct generate controller with name
$cake bake controller controller_name
- Want to direct generate view with view name
$cake bake view controller_name view_name
- Want to direct generate view with template name
view name and template name in : /cake/console/libs/templates/views and can add or override in : /app/vendors/shells/templates/views$cake bake view controller_name template_name view_name
- Want to generate controller like result of scaffold
$cake bake controller Users scaffold
- Want to generate controller add more actions for admin
$cake bake controller Users scaffold admin
- Want to gen controller only have actions for admin
$cake bake controller Users null admin
- Gen help
$cake bake model help
- List of model
$cake bake all
- model -> controller -> views
$cake bake all Model_name