Created
December 4, 2016 11:00
-
-
Save juban/4ec246986c001f644c6d85d73154c2d4 to your computer and use it in GitHub Desktop.
Yii2 - Create an ActiveDataProvider from a HasMany model relation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$applicationsDataProvider = new \yii\data\ActiveDataProvider([ | |
'query' => $model->getRelation('relationName'), | |
'pagination' => [ | |
'pageParam' => 'apps_page' | |
] | |
]); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment