コード例 #1
0
 public function actionCommentvote()
 {
     if (!Yii::$app->user->isGuest && Yii::$app->request->post('comment') != null && Yii::$app->request->post('vote') != null) {
         QueryModel::commentVote(Yii::$app->request->post('comment'));
     }
     return CommentRatesActiveRecord::getRates(Yii::$app->request->post('comment'));
 }
コード例 #2
0
 public function actionMessages($id)
 {
     $model = new CommentForm();
     if ($model->load(Yii::$app->request->post())) {
         if ($model->postMessage()) {
             $this->refresh();
         }
     }
     $messages = QueryModel::messages($id);
     return $this->render('messages', ['messages' => $messages, 'model' => $model]);
 }