Пример #1
0
 /**
  * Creates a new CustomerLog model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $username = Yii::$app->user->identity->username;
     $model = new CustomerLog();
     if (Yii::$app->request->isPost && ($model = CustomerLog::create(Yii::$app->request->post()))) {
         return $this->redirect(['update', 'id' => $model->id]);
     } else {
         return $this->render('create', ['username' => $username, 'model' => $model]);
     }
 }