The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist integready/yii2-linkpagerextender "~1.0"
or add
"integready/yii2-linkpagerextender": "~1.0"
to the require section of your composer.json
file.
- index.php
(View)
:
<?php
use yii\grid\GridView;
?>
<?= GridView::widget([
'id' => 'books-grid',
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'as pager' => 'integready\linkpagerextender\PagerBehavior',
'pager' => [
'class' => 'integready\linkpagerextender\LinkPager',
'template' => '{pageButtons} {pageSize}',
'pageSizeList' => [10, 50, 1000, 5000],
],
'columns' => [
// Columns list
],
]); ?>