Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttp\Psr7\Request

When posting form I am getting this exception

Unresolvable dependency resolving [Parameter #0 [ $method ]] in class GuzzleHttp\Psr7\Request

Searched and tried many ways to solve this but no progress. Seems that my problem is same as this issue

Any positive response will be appreciated. Thank You.

like image 200
Ansib Raza Avatar asked Nov 27 '17 19:11

Ansib Raza


2 Answers

I had the same error and found solution by removing following line.

use GuzzleHttp\Psr7\Request;

and use following Request class instead.

use Illuminate\Http\Request;

I hope it will help you too.

like image 96
Nirav Sheth Avatar answered Sep 20 '22 15:09

Nirav Sheth


I have also faced same error like in Laravel

Unresolvable dependency resolving [Parameter #0 [ $method ]] in class GuzzleHttp\Psr7\Request.

But when I changed

use GuzzleHttp\Psr7\Request; 

to

use Illuminate\Http\Request;

then the problem was gone.

like image 27
Saiful Islam Avatar answered Sep 19 '22 15:09

Saiful Islam