Laravel 5.1 报错:[AppHttpRequestsRequest] is not instantiable

mac2022-06-30  19

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;

 

 

 

转载于:https://www.cnblogs.com/gyfluck/p/10021836.html

最新回复(0)