Merge pull request #41 from WinterSilence/patch-2
Update basic-usage.md
This commit is contained in:
commit
3890336681
@ -1,17 +1,18 @@
|
|||||||
Basic Usage
|
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
|
Yii doesn't wrap the Bootstrap basics into PHP code since HTML is very simple by itself in this case. You can find details
|
||||||
about using the basics at [bootstrap documentation website](https://getbootstrap.com/docs/). Still Yii provides a
|
about using the basics at [Bootstrap documentation](https://getbootstrap.com/docs/). Still Yii provides a convenient
|
||||||
convenient way to include bootstrap assets in your pages with a single line added to `AppAsset.php` located in your
|
way to include Bootstrap assets in your pages with a line(s) added to `@app/assets/AppAsset.php`(basic application):
|
||||||
`@app/assets` directory:
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public $depends = [
|
public $depends = [
|
||||||
'yii\web\YiiAsset',
|
<...>
|
||||||
'yii\bootstrap5\BootstrapAsset', // this line
|
yii\bootstrap5\BootstrapAsset::class,
|
||||||
|
// optional, Bootstrap icons
|
||||||
|
// yii\bootstrap5\BootstrapIconAsset::class
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
Using bootstrap through Yii asset manager allows you to minimize its resources and combine with your own resources when
|
Using Bootstrap through Yii asset manager allows you to minimize its resources and combine with your own resources when
|
||||||
needed.
|
needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user