3

I know that there bunch of questions out there but mine doesn't seems fit in any.

I am working on laravel. php artisan was working fine an hour before. After that i just created a controller, a model and few views blade.

Now artisan simply won't work and no error at all. Even php artisan --version won't show anything.

I DIDN'T do any major changes like composer install, or update or install any new package. Neither any server configuration. It was just basic coding on controller , model and views.

Not sure what is causing this. What could be the reason and how shall i start debugging it?

4

2 回答 2

3

Artisan 是 Laravel 的一个集成部分,这意味着它使用控制台Application实例来运行命令,并且它将停止执行可能来自应用程序任何部分的错误。

语法错误可能是停止artisan工作的常见罪魁祸首,如果未启用调试,则不会显示错误(只是记录),因此在运行命令时不会得到任何输出。

要搜索语法错误,请转到您的项目目录并尝试通过运行以下命令来检查整个目录:

find -L ./ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l | grep "Errors parsing".

如果存在任何语法错误,该命令将输出第一个有错误的文件、发生错误的行和错误消息。

于 2016-04-10T09:00:31.690 回答
1

就我而言,文件和语法没有问题。但是当我重新安装它的依赖项时。

composer install

在您的工作目录中运行上述命令并且它有效。

于 2018-08-05T16:12:31.883 回答