当尝试安装一个包时,Laravel 4 Artisan错误

时间:2021-08-06 17:42:39

I am simply trying to install a laravel bundle via the Artisan CLI using the latest Laravel 4 beta from github.

我只是试图通过Artisan CLI安装laravel包,使用github最新的laravel 4 beta版。

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?

还有其他人经历过这个错误或者有什么解决方案的想法吗?

1 个解决方案

#1


35  

If you're using Laravel 4 (which based on the tags for this question, you are) then bundles are no longer used.

如果您正在使用Laravel 4(基于此问题的标记,您确实在使用它),那么将不再使用bundle。

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

Now, since you were asking about bob, the closest equivalent for the bob bundle would probably be Jeffrey Ways generator package, which you can learn more about here: Laravel-4-Generators

既然你问的是bob, bob bundle的最接近的对等物可能是Jeffrey Ways generator package,你可以在这里了解更多:laravel-4 - generator

#1


35  

If you're using Laravel 4 (which based on the tags for this question, you are) then bundles are no longer used.

如果您正在使用Laravel 4(基于此问题的标记,您确实在使用它),那么将不再使用bundle。

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

Now, since you were asking about bob, the closest equivalent for the bob bundle would probably be Jeffrey Ways generator package, which you can learn more about here: Laravel-4-Generators

既然你问的是bob, bob bundle的最接近的对等物可能是Jeffrey Ways generator package,你可以在这里了解更多:laravel-4 - generator