Created
June 12, 2013 13:09
-
-
Save dodopok/5765094 to your computer and use it in GitHub Desktop.
Salvar - CakePHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function add() { | |
if ($this->request->is('post')) { | |
$this->Tabela->create(); | |
if ($this->Tabela->save($this->request->data)) { | |
$this->Session->setFlash(__('A Tabela foi cadastrada.')); | |
$this->redirect(array('action' => 'index')); | |
} else { | |
$this->Session->setFlash(__('A Tabela não pôde ser cadastrada. Favor tentar novamente.')); | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment