Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过终端命令生成(烘焙)控制器:
bin/cake bake.bake controller [controller_name]
有命令可以反转吗?删除生成的控制器?
CakePHP 没有反向生成器。
使用rm -rf或手动删除文件时,应注意新文件不仅在 Controller 目录中生成。您还应该跟踪测试和模板目录中的其他文件。
rm -rf
可能的解决方法是使用真正的框架,如 Ruby On Rails,或者编写自己的 shell 脚本来生成或删除。