/** * Creates a new Forms model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Forms(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['index', 'viewer_id' => $model->viewer_id]); } else { return $this->render('create', ['model' => $model]); } }
public function actionDayentry() { $model = new Forms(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { //$model->date = strtotime($model->date); $model->save(); return $this->render('dayconfirm', ['model' => $model]); } else { return $this->render('dayentry', ['model' => $model]); } }