Esempio n. 1
0
 public function update()
 {
     $id = $this->request->get('id');
     $name = $this->request->get('name');
     $item = CompanyTable::get($id);
     if ($item) {
         $item->name = $name;
         $item->update();
         $this->server->sendOK();
     } else {
         $this->server->sendNotFound();
     }
 }
Esempio n. 2
0
 public function get()
 {
     $data = CompanyTable::getAll();
     $this->server->sendData($data);
 }