Exemplo n.º 1
0
 /**
  * Создать
  */
 public function actionCreate()
 {
     $model = new Work();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return Yii::$app->getResponse()->redirect(['/admin/work/update', 'id' => $model->id]);
     }
     return $this->render('create', ['model' => $model]);
 }