Integração de APIs com PHP

EXIBINDO RESPOSTAS:

Avatar discord do usuario vinidanger.

vinidanger.

DB::insert('INSERT INTO ateste (topic) VALUES (?)',[json_encode($_POST, true)]);

Avatar discord do usuario joelemanoel

joelemanoel

Tente:

php
DB::insert('INSERT INTO ateste (topic) VALUES (?)',[json_encode(file_get_contents("php://input"), true)]);

Avatar discord do usuario vinidanger.

vinidanger.

Dessa forma funciona perfeitamente. Saberia informar o motivo do $_POST estar vazio?