Yii2 Active Data Provider

[Solved] Yii2 Active Data Provider | Php Frameworks Yii - Code Explorer | yomemimo.com
Question : yii2 active data provider

Answered by : nutty-narwhal-xpaxojtg3g20

$provider = new ActiveDataProvider([ 'query' => Post::find(), 'pagination' => [ 'pageSize' => 20, ],
]);
// get the posts in the current page
$posts = $provider->getModels();

Source : https://www.yiiframework.com/doc/api/2.0/yii-data-activedataprovider | Last Update : Thu, 21 Jul 22

Answers related to yii2 active data provider

Code Explorer Popular Question For Php Frameworks Yii