i am using Yii2 with a scroll pager extension: http://kop.github.io/yii2-scroll-pager/
Here's my code:
echo yii\widgets\ListView::widget([
'dataProvider' => $boards,
'itemView' => 'boards',
'layout' => $template,
'itemOptions' => ['class' => 'item'],
'pager' => ['class' => \kop\y2sp\ScrollPager::className()]
]);
and i am seetting dataProvider from modal The Code is given below
$dataProvider = new ActiveDataProvider([
'query' => Boards::find(),
'pagination' => array('pageSize' => 3),
]);
return $dataProvider;
But i am getting the following exception
PHP Notice – yii\base\ErrorException Undefined variable: boards
Can any when tell me what is the wrong ?