예제 #1
0
 public function actionAddComment()
 {
     $comment = new Comment();
     $comment->load(Yii::$app->request->post(), '');
     if ($comment->save()) {
         return $comment;
     }
     return $comment->getErrors();
 }