laravel php artisan 错误
当运行 php artisan 的任意命令时出现如下错误时:
[RuntimeException]
Error Output: PHP Catchable fatal error: Argument 2 passed to Illuminate\R
outing\UrlGenerator::__construct() must be an instance of Illuminate\Http\R
equest, null given, called in \laravel5\vendor\laravel\fram
ework\src\Illuminate\Routing\RoutingServiceProvider.php on line 62 and defi
ned in laravel5\vendor\laravel\framework\src\Illuminate\Ro
uting\UrlGenerator.php on line 102
可能是因为你在config目录下的配置文件中调用了url('') 方法,只要去掉url('') 方法即可。
本文解决了一个常见的Laravel框架问题:在运行PHPArtisan命令时遇到的RuntimeException错误。错误信息提示UrlGenerator构造函数接收了错误类型的参数。解决方法是检查config目录下的配置文件,移除可能导致问题的url('')方法。

1375

被折叠的 条评论
为什么被折叠?



