Webhook to PHP

Here is what my JSON receives from TTN cloud up to webhook.site.
With all my code below, I receive success => true, message => ‘Data received successfully’, but I receive null in data.
Why? Do you have any advice to give me ?

JSON :

{
“uplink_message”: {
“decoded_payload”: {
“humidity”: 52.49,
“pressure”: 1015.64,
“temperature1”: 22.87,
“temperature2”: 22.71
}
}
}

Controllers :

class InsertData extends ResourceController
{
protected $modelName = ‘App\Models\MinsererDonnees’;
protected $format = ‘json’;

// Function to retrieve the data
public function index()
{
    // Retrieves the JSON data sent by the request
    $queryData = file_get_contents('php://input');

    // Checks whether data has been received
    if ($queryData !== false) {
        // Responds to the request with a success message and the data received
        return $this->response->setJSON([
            'success' => true,
            'message' => 'Data received successfully',
            'data' => json_decode($queryData, true)
        ])->setStatusCode(200);
    } else {
        // Responds to the request with an error message if no data has been received
        return $this->response->setJSON([
            'success' => false,
            'message' => 'Error retrieving request data'
        ])->setStatusCode(400);
    }
}

}

Can you confirm that you are running this PHP on https://webhook.site?

Yes, I confirm that I am running this PHP on https://webhook.site

I can’t see how that works - I know it has it’s own scripting support that is loosely based on PHP but not full-on PHP like you have.

And by implication, if you return something, it will go back to the source, which is TTN.

What do the webhook.site people say?