public function execute() { $config = $this->getConfig(); $cargo = new cargoTable($config); $id = filter_input(INPUT_GET, 'id'); $cargo->setId($id); $cargo->delete(); header('Location: ' . $config->getUrl() . 'index.php/cargo/index'); }
public function execute() { $config = $this->getConfig(); $formcargo = filter_input_array(INPUT_POST)['cargo']; $cargo = new cargoTable($config); $cargo->setId($formcargo['id']); $cargo->setDescripcion($formcargo['descripcion']); $this->objcargo = $cargo->update(); header('Location: ' . $config->getUrl() . 'index.php/cargo/index'); exit; }