###実現したいこと
CakePHPでブログチュートリアルにあるような掲示板をを作っています。
データを投稿した後、投稿完了画面に遷移するような実装をしたいのですが、
ページ遷移の処理のアクションを実行すると、
データがうまく投稿できません。
どなたかアドバイスお願いしたいです。
###ソースコード
<?php class CollegesController extends AppController { public $helpers = array('Html', 'Form'); public $components = array('Paginator', 'Flash'); public function index(){ $this->set('colleges',$this->College->find('all')); } public function add(){ if ($this->request->is('post')) { $this->College->create(); if (empty($this->College->save($this->request->data))) { $this->Flash->success(__('○○')); return $this->redirect(array('controller' => 'colleges', 'action' => 'complete')); } $this->Flash->error(__('○○')); } } public function complete(){ } }
###補足情報(言語/FW/ツール等のバージョンなど)
cakePHP2.6
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/02/29 15:05