public function getEntradesPerDiaIMitjaPagament() { $EM = new EntradesModel(); $postdata = file_get_contents("php://input"); $request = json_decode($postdata, true); echo json_encode($EM->getEntradesPerDiaIMitjaPagament($request['TipusPagament'], $request['idEspectacle'])); }