いまどきのコントローラ app/Controller/PostsController.php <?php App::uses('AppController', 'Controller'); class PostsControllerextends AppController { public $uses = array('Post'); public function add() { if ($this->request->is('post')) { if ($this->Post->save($this->request->data)) { $this->Session->setFlash('Your post has been saved.'); $this->redirect(array('action' => 'index')); } else { $this->Session->

