Esempio n. 1
0
 public function actionIndex()
 {
     $departments = Departments::getAll();
     $searchModel = new Payments();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['departments' => $departments, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
Esempio n. 2
0
 public function actionPutDepartments()
 {
     $data = Yii::$app->request->post();
     Departments::setDepartments($data);
     $result = Departments::getAll();
     print_r(json_encode($result));
     return false;
 }