コード例 #1
0
 public function actionAdd()
 {
     $model = new Article();
     if (Request::isPost()) {
         if ($model->add(['title' => Request::post('title'), 'content' => Request::post('content')])) {
             Redirect::home();
         }
     }
     echo $this->view->render('add');
 }