Skip to content

Instantly share code, notes, and snippets.

@kleberksms
Last active December 30, 2015 06:09
Show Gist options
  • Save kleberksms/7786943 to your computer and use it in GitHub Desktop.
Save kleberksms/7786943 to your computer and use it in GitHub Desktop.
<?php
//view
// view Users/cadastro.ctp
$this->Form->create(false,array('controller'=>'designers','action'=>'register'));
$this->Form->input('whatever');
$this->Form->submit('save');
$this->Form->end();
$this->Form->create(false,array('controller'=>'users','action'=>'register'));
$this->Form->input('whatever');
$this->Form->submit('save');
$this->Form->end();
?>
<?php
//Controller Designers
public $uses = array('Designer','User')
public function register(){
$this->User->save($data);
$this->render('view');
}
//some tables using here
//Controller User
public $uses = array('User')
public function register(){
$this->User->save($data);
$this->render('view');
}
//A view pode ter qualquer nome, mesmo que ela não tenha um método para ela
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment