简体   繁体   English

php artisan list在laravel 5.2中不起作用

[英]php artisan list is not working in laravel 5.2

I am new in laravel. 我是Laravel新手。 i need just list for all artisan commands, but i am getting this error 我只需要列出所有工匠命令,但出现此错误

laravel-master$ php artisan list

[ErrorException]                                                  
  The use statement with non-compound name 'Session' has no effect  

Thanks in advance 提前致谢

It seems you use somewhere in your code: 似乎您在代码中的某处使用了:

use Session;

but you are not in any namespace. 但您不在任何名称空间中。

You should verify in your code where you have this piece of code and remove this in file where you don't have 您应该在代码中验证您是否有这段代码,并在没有文件的地方将其删除

namespace ...

I suppose it's rather bug in your code than bug in Laravel and if you have something like this for example in controller, artisan command might behave like this until you fix the error. 我想这是代码中的错误,而不是Laravel中的错误,如果您在控制器中有类似这样的内容,则artisan命令在修复错误之前可能会这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM