public function Search($params) { $query = Users::find(); $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 3]]); if ($this->load($params) && $this->validate()) { //$query->andFilterWhere(['user_rank' => $this->user_rank]); $query->andWhere(['user_rank' => $this->user_rank]); return $dataProvider; } return $dataProvider; }
public function GetList($params = []) { $query = Users::find(); $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 8]]); return $dataProvider; }