How to add a class to tags in a GridView
For example [ ‘attribute’ => ‘name’, ‘contentOptions’ => [‘class’ => ‘text-center’], ‘headerOptions’ => [‘class’ => ‘text-center’] ], contentOptions – for td cells, headerOptions – for th cells Reference: Yii2 Docs | Column classes in GridView