为什么我在Laravel中遇到此错误:PHP可捕获的致命错误? [英] Why am I getting this error with Laravel: PHP Catchable Fatal Error?
本文介绍了为什么我在Laravel中遇到此错误:PHP可捕获的致命错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试运行php artisan (anything)
时出现此错误:
I'm getting this error when I try to run php artisan (anything)
:
PHP Catchable fatal error: Argument 2 passed to
Illuminate\Routing\UrlGenerator::__construct()
must be an instance of Illuminate\Http\Request, null given, called in
/www/laravel5/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 56 and defined in
/www/laravel5/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 81
Catchable fatal error: Argument 2 passed to
Illuminate\Routing\UrlGenerator::__construct()
must be an instance of Illuminate\Http\Request, null given, called in
/www/laravel5/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 56 and defined in
/www/laravel5/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 81
我完全不知道是什么原因造成的,需要帮助.
I have absolutely no idea what is causing it and need help with it.
预先感谢
推荐答案
好了,我发现了产生错误的原因.
Well I discovered what generated the error.
在config/services.php
中,我正在这样做:
'facebook' => [
'client_id' => env('FACEBOOK_APP_ID', null),
'client_secret' => env('FACEBOOK_APP_SECRET', null),
'redirect' => url('auth/facebook'),
]
url('auth/facebook')
是导致错误的原因.
这篇关于为什么我在Laravel中遇到此错误:PHP可捕获的致命错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文