getAll(); header('Content-Type: application/json'); echo json_encode($result); } // CREATE new user public function create($data): void { $model = new UserModel(); $result = $model->insert($data); header('Content-Type: application/json'); echo json_encode($result); } // UPDATE user info public function set($data): void { $model = new UserModel(); $result = $model->update($data); header('Content-Type: application/json'); echo json_encode($result); } }