码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2018-11-26 20:11:21      阅读:576      评论:0      收藏:0      [点我收藏+]

标签:exce   控制器   binding   targe   pre   报错   解决   ble   color   

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

标签:exce   控制器   binding   targe   pre   报错   解决   ble   color   

原文地址:https://www.cnblogs.com/gyfluck/p/10021836.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!