Пример #1
0
 public function actionFeedback()
 {
     $model = new Feedback();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         if ($feed = $model->feed()) {
             Yii::$app->session->setFlash('success', 'thank you for your feedback');
         }
         return $this->refresh();
     } else {
         return $this->render('feedbackForm', ['model' => $model]);
     }
 }