現在、フォームから対応するテーブルの正しいフィールドへの入力のマッピングに問題があり、データベースに挿入するときに空白のフィールドしか取得できません。ポップアップするエラーはありませんが、ケーキはデータをどこに置くべきかを知る場所がないようです。
<?php
class UserfilesController extends AppController {
public function index(){
$this->set('userfiles', $this->Userfile->find('all'));
}
public function latest() {
if (empty($this->request->params['requested'])) {
throw new ForbiddenException();
}
return $this->Userfile->find('all', array('order' => 'Userfile.created DESC', 'limit' => 10));
}
public function add() {
if ($this->request->is('post')) {
$this->Userfile->create();
if ($this->Userfile->save($this->request)) {
$this->render('/homes');
} else {
$this->Session->setFlash(__('Something went wrong!'));
}
}
}
/*public function add() {
if ($this->request->is('post')) {
print_r($this->request);
}
}*/
}