laravel 8 make: request code example
Example 1: laravel create new request
$myRequest = new \Illuminate\Http\Request();
$myRequest->setMethod('POST'); //default METHOD
$myRequest->request->add(['foo' => 'bar']);
dd($request->foo);
Example 2: laravel 6 make http request
$client = new GuzzleHttp\Client();
$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]);
echo $res->getStatusCode(); // 200
echo $res->getBody(); // { "type": "User", ....