Ejemplo n.º 1
0
 public function actionAddtask()
 {
     $model = new TaskForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         Yii::$app->session->setFlash('contactFormSubmitted', 'success');
         return $this->refresh();
     } else {
         return $this->render('add_task', ['model' => $model]);
     }
 }
Ejemplo n.º 2
0
 public function actionIndex()
 {
     $models = TaskForm::find()->all();
     echo $this->render('index', array('models' => $models));
 }