public function destroy() { $id = $this->request->get('id'); $item = AgreementTable::get($id); if ($item) { $item->delete(); $this->server->sendOK(); } else { $this->server->sendNotFound(); } }
public function get() { $data = AgreementTable::getAll(); $this->server->sendData($data); }