jeudi 30 juillet 2020

How to clear laravel request?

I accept a response from a form and I want to create a request using Request::create() and pass parameters to it. But when the request gets created, the previous form request parameters is also attached. I want to clear those request and only pass parameters through Request::create() Below is my code:

$request = Request::create('api/my-api', 'POST', $response);
$request->headers->set('Content-Type', 'application/json');
$request->headers->set('api-key' , $api_key);
$request->headers->set('api-secret', $api_secret);
Route::dispatch($request)

Please help.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2EzGit1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire