0

I got started with my new CakePHP 3.3.9 project today. As usual I wanted to create a few scaffold using cake bake command. As I already had a CakePHP 2.5.5 setup in my machine. I still needed it and its cake bake commands to run to create any thing while working on the cakephp 2.x project. So is there a way I could use both cake bake consoles for CakePHP 2.x and 3.x respectively, at the same time?

Just had a look at possible duplicate. But in my case, I have paths set and I want to use cake bake globally. From anywhere. There might be situations when someone might want to use a cake bake scrip globally. I have a multi-site setup built in CakePHP and in it I create multi-sites based on one core "Cake" Library.

4

1 回答 1

0

无论如何,我找到了答案。

您仍然可以通过将 shell 脚本文件重命名为不同的名称来全局使用两者。例如,我将我的 cake 和 cake.bat 分别重命名为 cake2 和 cake2.bat,它工作得很好,通过这样的调用:

cake2 烘烤。

还张贴在这里http://www.devarticles.in/cakephp/using-cakephp-bake-console-cakephp-2-x-3-x/

于 2016-12-08T10:34:37.087 回答