1. 程式人生 > >Laravel 5.1 報錯:[AppHttpRequestsRequest] is not instantiable

Laravel 5.1 報錯:[AppHttpRequestsRequest] is not instantiable

like php 報錯 sts http 路徑 bin requests lin

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