public function actionAdd()
 {
     $model = new EmployeeModel();
     $model->load(\Yii::$app->request->post());
     $model->add();
 }
예제 #2
0
 /**
  * Lists all Employee models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new EmployeeModel();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }