Alphapager demo

Showing 181-200 of 610 items.
#Last NameFirst NameBornDied
181FerreriMarco1928/05/111997/05/09
182FerryBryan1945/09/26
183FieldsW.C.1880/01/291946/12/25
184FignonLaurent1960/08/122010/08/31
185FimmelTravis1979/07/15
186FincherDavid1962/05/10
187FinneyAlbert1936/05/092019/02/07
188FlemingIan1908/05/281964/08/12
189FoDario1926/03/242016/10/13
190FogertyJohn1945/05/28
191FokkerAnthony1890/04/061939/12/23
192FranklinAretha1942/03/252018/08/16
193FranssensJean-Paul1938/02/052003/06/19
194FranzenJonathan1959/08/17
195FreudLucien1922/12/082011/07/21
196FreudSigmund1856/05/061939/09/23
197FrostDavid1937/04/072013/08/31
198FryStephen1957/08/24
199FullerRichard Buckminster1895/07/121983/07/01
200GalileiGalileo1564/02/051642/01/08

Yii2 Alphapager lets you do alphabetic paging in the Yii framework 2.0. On this page it is shown in it's default operation, 'out of the box'.

The relevant code involved is something like this:

<?php

use sjaakp\alphapager\ActiveDataProvider;
use sjaakp\alphapager\AlphaPager;

$query = Person::find()->orderBy('last_name, first_name');

$dataProvider = new ActiveDataProvider([
    'query' => $query,
    'alphaAttribute' => 'last_name',
]);
?>

<?= AlphaPager::widget([
    'dataProvider' => $dataProvider,
]) ?>

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],

        'last_name:ntext',
        'first_name:ntext',
        'born:date',
        'died:date',
    ],
]); ?>

A slightly more advanced example is here.