Created
September 26, 2019 13:37
-
-
Save galvao/ea5a3f6373feb41861ab887414cdec2a to your computer and use it in GitHub Desktop.
Correção: ProdutoController
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
public function cadastrarAction() | |
{ | |
$requisicao = $this->getRequest(); | |
if ($requisicao->isPost()) { | |
$dados = $requisicao->getPost(); | |
$model = new Produto(); | |
$model->exchangeArray($dados); | |
$this->table->cadastrar($model); | |
} | |
return new ViewModel([ | |
'nome' => $dados['nome'], | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment