laravel UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given报错处理

版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/sqlquan/article/details/88740111

[2019-03-22 06:10:01] production.ERROR: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /Jingkai/www/jingkai/jkshop/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 61 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Argument 2 passed to Illuminate\\Routing\\UrlGenerator::__construct() must be an instance of Illuminate\\Http\\Request, null given, called in /Jingkai/www/jingkai/jkshop/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 61 at /Jingkai/www/jingkai/jkshop/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:111)
 

发生这个错误情况是在config中使用url()或者asset()引起的。当运行artisan命令时,laravel无法知道url是啥导致的

猜你喜欢

转载自blog.csdn.net/sqlquan/article/details/88740111