public function actionIndex()
{
$dataProvider = new ActiveDataProvider([
'query' => Transactions::find(),
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'number',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>