Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

yii2 active data provider

$provider = new ActiveDataProvider([
    'query' => Post::find(),
    'pagination' => [
        'pageSize' => 20,
    ],
]);

// get the posts in the current page
$posts = $provider->getModels();
Source by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #active #data #provider
ADD COMMENT
Topic
Name
2+1 =