Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ncltours's avatar

Capture request on post Api created by Me

Hi I have created an API to send response. Its POST request. Now I want to capture the request they have input. How Can I capture the request on my API url?

My way of capture data is :

public function postData(Request $request) {

    $ticketNums           = Input::get("ticketNums");
   
    $paymentGate          = Input::get("paymentGate");
  
    return response()->json(['errorCode' => 0, 'errorMsg' => 'ok']);
    

}

Can you help to modify How can I capture request data in the function.

0 likes
0 replies

Please or to participate in this conversation.