Laravel 5.1 报错:[App\Http\Requests\Request] is not instantiable

Laravel 5.1 报错:[App\Http\Requests\Request] is not instantiable


 

错误提示:

Whoops, looks like something went wrong.
1/1
BindingResolutionException in Container.php line 749:
Target [App\Http\Requests\Request] is not instantiable.
... ...
... ...

发生情境:

在控制器中:

use App\Http\Requests\Request;

public function create(Request $request){}

解决办法:

使用这个路径的请求类

use Illuminate\Http\Request;

 

 

 

Laravel 5.1 报错:[App\Http\Requests\Request] is not instantiable

上一篇:Cannot retrieve definition for form bean null on action错误


下一篇:ADB连接手机遇到的问题:list of devices attached