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;

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM