2021-07-09 17:53:24 +08:00
|
|
|
Basic Usage
|
|
|
|
===========
|
|
|
|
|
|
|
|
Yii doesn't wrap the bootstrap basics into PHP code since HTML is very simple by itself in this case. You can find details
|
2021-08-05 15:21:05 +08:00
|
|
|
about using the basics at [bootstrap documentation website](https://getbootstrap.com/docs/). Still Yii provides a
|
2021-07-09 17:53:24 +08:00
|
|
|
convenient way to include bootstrap assets in your pages with a single line added to `AppAsset.php` located in your
|
|
|
|
`@app/assets` directory:
|
|
|
|
|
|
|
|
```php
|
|
|
|
public $depends = [
|
|
|
|
'yii\web\YiiAsset',
|
2021-08-03 16:22:50 +08:00
|
|
|
'yii\bootstrap5\BootstrapAsset', // this line
|
2021-07-09 17:53:24 +08:00
|
|
|
];
|
|
|
|
```
|
|
|
|
|
|
|
|
Using bootstrap through Yii asset manager allows you to minimize its resources and combine with your own resources when
|
|
|
|
needed.
|