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;

 

 

 

posted @ 2018-11-26 17:52  学知无涯  阅读(2379)  评论(0编辑  收藏  举报