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('')
方法即可。