Api Controller Progress

This commit is contained in:
JonatanRek 2020-04-24 19:05:18 +02:00
parent 34ee711182
commit 84127bf7ab

View File

@ -22,9 +22,9 @@ class ApiCOntroller {
} }
} }
function response(){ function response($data = [], $httpCode = '200'){
http_response_code($this->httpCode); http_response_code($httpCode);
echo json_encode($this->data); echo json_encode($data);
die(); die();
} }
} }