diff --git a/library/ApiController.php b/library/ApiController.php index ebe9854..aee4fa9 100644 --- a/library/ApiController.php +++ b/library/ApiController.php @@ -22,9 +22,9 @@ class ApiCOntroller { } } - function response(){ - http_response_code($this->httpCode); - echo json_encode($this->data); + function response($data = [], $httpCode = '200'){ + http_response_code($httpCode); + echo json_encode($data); die(); } } \ No newline at end of file