public function updateAction($id) { $model = Fretes::findFirst($id); $this->view->form = new FreteForm($model, array('edit' => true)); $this->view->frete = $model; if ($this->request->isPost()) { $this->save($model); } }