public function actionIndex() {
$dataProvider = new ActiveDataProvider([
'query' => User::find(),
'pagination' => [
'pageSize' => 1,
],
]);
$searchModel = new UserSearch();
return $this->render('index', [
'dataProvider' => $dataProvider,
'searchModel' => $searchModel,
]);
}
$dataProvider = $searchModel->search(Yii::$app->request->get());
Find more questions by tags Yii
Thanks, your example helped. was replaced by:
only pagination was off and displayed all at once, it is necessary to specify probably somewhere in the search method? - audrey_Kautz commented on June 10th 19 at 15:04
- bryana.Renn commented on June 10th 19 at 15:07
:( - audrey_Kautz commented on June 10th 19 at 15:10
$dataProvider->pagination->pageSize = 1
- bryana.Renn commented on June 10th 19 at 15:13