https://github.com/thecodeholic/yii2-basic-bootstrap4
Yii2 Basic application with Bootstrap 4 integration
https://github.com/thecodeholic/yii2-basic-bootstrap4
Last synced: 3 months ago
JSON representation
Yii2 Basic application with Bootstrap 4 integration
- Host: GitHub
- URL: https://github.com/thecodeholic/yii2-basic-bootstrap4
- Owner: thecodeholic
- License: bsd-3-clause
- Created: 2020-04-25T08:00:57.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T02:51:53.000Z (over 2 years ago)
- Last Synced: 2025-03-21T22:41:28.577Z (3 months ago)
- Language: PHP
- Size: 119 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
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](https://github.com/yiisoft/yii2-app-basic) 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`.
```php
= \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
```php
= \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
