I am trying to send post data and retrieve them in the response. I look online and found guzzle, so there is what I've done :
The controller part I wan't to call on route 'test' :
public function test(Request $request) {
return $request->input('test');
}
public function sinistre(Client $client) {
$request = $client->post(route('test') , [], [
'form_params' => [
'test' => 'edf'
]
]);
$response = $request->send();
dd($response);
return "ok";
}
Version of guzzle : "guzzlehttp/guzzle": "^6.2"
For now I only got a 500 error response.
dd(route('test'));
– Anar Bayramov