尝试安装捆绑包时 Laravel 4 Artisan 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15868804/
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 4 Artisan error when trying to install a bundle
提问by tymondesigns
I am simply trying to install a laravel bundle via the Artisan CLI using the latest Laravel 4 beta from github.
我只是尝试使用来自 github 的最新 Laravel 4 beta 通过 Artisan CLI 安装 Laravel 包。
But when I try something like:
但是当我尝试类似的事情时:
php artisan bundle:install bob
I'm confronted with
我面临
[InvalidArgumentException]
There are no commands defined in the "bundle" namespace.
I've had a look around online and can't seem to find a solution to this or even anyone else having similar problems for that matter.
我在网上环顾四周,似乎无法找到解决此问题的方法,甚至无法找到其他有类似问题的人。
Has anyone else experienced this error or any ideas on a solution?
有没有其他人遇到过这个错误或对解决方案的任何想法?
回答by duellsy
If you're using Laravel 4 (which based on the tags for this question, you are) then bundles are no longer used.
如果您使用的是 Laravel 4(基于此问题的标签,您是),则不再使用捆绑包。
Out with bundles, in with composer
与捆绑包一起出去,与作曲家一起进入
Instead, Laravel 4 makes use of composer packages. It's kind of similar but at the same time very different in how it works. Here isn't the right place to explain all of composer, so check out the links below to find out more:
相反,Laravel 4 使用了 composer 包。它有点相似,但同时它的工作方式却大不相同。这里不是解释所有作曲家的正确地方,因此请查看以下链接以了解更多信息:
Laravel 4 Generator
Laravel 4 生成器
Now, since you were asking about bob, the closest equivalent for the bob bundlewould probably be Jeffrey Ways generator package, which you can learn more about here: Laravel-4-Generators
现在,既然您问的是bob,那么与bob 包最接近的等价物可能是 Jeffrey Ways 生成器包,您可以在此处了解更多信息:Laravel-4-Generators