Files
elixforms-web-services/src/Api/Core/Response.php
T

12 lines
246 B
PHP

<?php
namespace Api\Core;
class Response {
public function json($data, $status = 200) {
http_response_code($status);
header('Content-Type: application/json');
echo json_encode($data);
exit;
}
}