Using CakePHP 2.6.7
When baking a normal part of an application (e.g. using cake bake model
) the console is interactive - it goes through the construction process asking for you to choose options at each stage.
But when using cake bake model MyModel --plugin MyPlugin
to do the same for a plugin no options are displayed and it generates the model in the plugin folder using default settings.
Is there a way to make the generation of the individual parts of a plugin interactive in the same manner? (this goes for model/controller/view)
答案 0 :(得分:0)
当使用cake bake model MyModel --plugin MyPlugin
烘焙插件中的模型时,它使用脚手架。为避免这种情况,您必须使用cake bake model --plugin MyPlugin
,然后显示的第一个选项将允许您从可能的模型中进行选择。
将model
替换为controller
/ view
,并将其烘焙。