Yii 2 Basic Project Template with Bootstrap 4
This is Yii2 Basic Project template with Bootstrap 4. Bootstrap 3 is completely removed from project.
INSTALLATION
Checkout Yii 2 Basic Project Template for installation instructions.
Fixing action buttons in GridView
After removing bootstrap 3 and installing bootstrap 4 you will probably see empty action column in grid view. Something similar to this.
To fix this you need to change the action column class of your GridView into app\grid\ActionColumn
.
<?= \yii\grid\GridView::widget([
// ...
'columns' => [
// ...
['class' => 'app\grid\ActionColumn'],
],
]); ?>
####In order this to work you need to include font-awesome 5 icons as well.
Fixing pager of GridView/ListView
By default pager on GridView and ListView looks ugly as well.
To fix this you need to add pager to GridView or ListView widgets
<?= \yii\grid\GridView::widget([
'pager' => [
'class' => \yii\bootstrap4\LinkPager::class
],
]);
// For list view
\yii\widgets\ListView::widget([
'pager' => [
'class' => \yii\bootstrap4\LinkPager::class
],
]);
And this is how your pager will look like