Add CakePHP
public function add() { if (!empty($this->data)) { if ($this->ControllerSingular->save($this->data)) { $this->Session->setFlash('Your post has been saved.'); $this->redirect(array('action' => 'index')); } } }