私はケーキに不慣れで、イベントが保存された後にリダイレクトする関数を取得しようとしています。それは他のコード、たとえばユーザーでは機能しますが、イベントでは機能しません。
関数はイベントを保存します、それはただそれがリダイレクトするか、SETFLASHを使用しません
これが私のイベントコントローラー追加機能のコードです:
public function add() {
if ($this->request->is('post')) {
$this->Event->create();
if ($this->Event->save($this->request->data)) {
$this->Session->setFlash(__('The event has been saved'));
$this->redirect(array('action' => 'eventmanage'));
} else {
$this->Session->setFlash(__('The event could not be saved. Please, contact the administrator.'));
}
}
}
どんな助けでも大いに感謝します!