cakephp-2.1 - CakePHP 2.2.2 烘焙插件

标签 cakephp-2.1

我正在尝试在我的应用程序中为我的插件烘焙模型、 Controller 和 View :admin。我正在使用 Windows 7。烘焙在烘焙应用程序和应用程序内工作。

这就是我正在做的:

  • cd c:\wamp\www\propharm\app(也试过没有\app)
  • 蛋糕烘焙插件管理模型

  • 这是我的插件所在的文件夹:C:\wamp\www\propharm\app\Plugin

    我从控制台得到了这个回应。
    Create the directory structure, AppModel and AppController classes for a
    new plugin. Can create plugins in any of your bootstrapped plugin paths.
    
    Usage:
    cake bake plugin [-h] [-v] [-q] [<name>]
    
    Options:
    
    --help, -h     Display this help.
    --verbose, -v  Enable verbose output.
    --quiet, -q    Enable quiet output.
    
    Arguments:
    
    name  CamelCased name of the plugin to create.
          (optional)
    

    我试过这个:
    在 bootrap.php 中
    CakePlugin::load('Admin');
    

    它仍然无法正常工作。如果有人知道我做错了什么,请帮忙。谢谢。
    路易斯

    最佳答案

    1)烘焙你的插件:

    cake bake plugin PluginNameInCamelCase
    

    2)烘烤其他所有东西:
    cake bake controller ControllerName --plugin PluginNameInCamelCase
    

    有关烘焙插件的更多文档,请参阅此页面:Creating Your Own Plugins with CakePHP

    关于cakephp-2.1 - CakePHP 2.2.2 烘焙插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12280756/

    相关文章:

    cakephp - 如何在 Cakephp 中添加 id 和 class 来选择框

    php - 运行 CakePHP shell 时 preg_replace_callback() 警告

    jquery - 内置this->js->提交cakephp运行两次

    cakephp - 在 CakePHP 身份验证组件中使用电子邮件而不是用户名

    mysql - foreach 不打印 cakephp 中的查询结果

    cakephp - cakePHP 2 中的 javascript 助手发生了什么变化?

    cakephp - 如何在CakePHP 2.0的 Controller 中导入类?

    php - CakePHP 复选框 - 忽略未选中的复选框

    authentication - CakePHP 2.x 身份验证与两个单独的登录

    mysql - CakePHP MySQL View