コード例 #1
0
 protected function saveAccessLog($params = [])
 {
     $request = $this->getRequest();
     $log = new MAccessLog();
     $log->setAttributes($request, false);
     $log->setAttributes($params, false);
     $log->save(false);
 }
コード例 #2
0
ファイル: AccesslogController.php プロジェクト: noikiy/wowewe
 /**
  * Creates a new MAccessLog model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new MAccessLog();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }