Laravel 生成不工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19185917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel Generate not working
提问by Perkin5
I am running Sublime Test 2 in Windows 7 64-bit. I have installed (and re-installed many times) Laravel Generator and Laravel 4 Artisan. I have updated composer and all dependencies. But I cannot get it to work properly. If I press ctrl-shift-P and type 'laravel' I get a list of 11 Artisan options, then a list of 17 Generate options, 6 of which appear to be duplications, and then another list of 20 Artisan options. The first lot of Artisan options give WindowsError: [Error 2] The system cannot find the file specified, the Generate options give [InvalidArgumentException] There are no commands defined in the "generate" namespace.
我在 Windows 7 64 位上运行 Sublime Test 2。我已经安装(并重新安装了很多次)Laravel Generator 和 Laravel 4 Artisan。我已经更新了 Composer 和所有依赖项。但我无法让它正常工作。如果我按 ctrl-shift-P 并输入“laravel”,我会得到一个包含 11 个 Artisan 选项的列表,然后是一个包含 17 个 Generate 选项的列表,其中 6 个似乎是重复的,然后是另一个包含 20 个 Artisan 选项的列表。第一批 Artisan 选项给出了 WindowsError: [Error 2] The system cannot find the file specified, Generate 选项给出了 [InvalidArgumentException] “generate”命名空间中没有定义命令。
The second batch of Artisan options do appear to work eg Laravel Artisan: Controller: Make gives a command line and if I type 'test' it creates a restful controller called test.php.
第二批 Artisan 选项似乎确实有效,例如 Laravel Artisan: Controller: Make 提供了一个命令行,如果我输入“test”,它会创建一个名为 test.php 的宁静控制器。
However, the more comprehensive resource generation remains unavailable to me. Can anyone shed any light?
但是,我仍然无法获得更全面的资源生成。任何人都可以发光吗?
采纳答案by Glad To Help
First make sure you install this plugin first: https://github.com/laravelbook/laravel4-sublimetext-helper
首先确保你先安装这个插件:https: //github.com/laravelbook/laravel4-sublimetext-helper
And then you might want to do what is referred here:
然后你可能想做这里提到的事情:
There are other Windows users that had difficulties with this, but seem to have resolved them.
还有其他 Windows 用户遇到了这个问题,但似乎已经解决了这些问题。
回答by Andy Fleming
If you are using the way/generators
package, you need to make sure to include the service provider ('Way\Generators\GeneratorsServiceProvider'
) in your config.app
file.
如果您正在使用该way/generators
软件包,则需要确保'Way\Generators\GeneratorsServiceProvider'
在您的config.app
文件中包含服务提供商 ( ) 。