'buttons' => [
'view' => function ($url, $model) {
return Html::a(
'<i class="far fa-eye"></i>',
"#",
[
'data-toggle' => 'modal',
'data-target' => '#viewSupplier-' . $model->id,
'title' => 'View',
'aria-label' => 'View',
'data-pjax' => '0',
'class' => 'btn btn-dark btn-sm text-white'
]);
}
<?php foreach ($dataProvider->models as $model) { ?>
<div class="modal fade" id="viewSupplier-<?= $model->id ?>" tabindex="-1" role="dialog"