yii2-bootstrap5/docs/guide/basic-usage.md
2021-08-05 09:21:05 +02:00

641 B

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 about using the basics at bootstrap documentation website. Still Yii provides a convenient way to include bootstrap assets in your pages with a single line added to AppAsset.php located in your @app/assets directory:

public $depends = [
    'yii\web\YiiAsset',
    'yii\bootstrap5\BootstrapAsset', // this line
];

Using bootstrap through Yii asset manager allows you to minimize its resources and combine with your own resources when needed.