Here is my code:
<?php
use yii\bootstrap\Alert;
echo Alert::widget([
'options' => ['class' => 'alert-success'],
'body' => 'message...',
]);
?>
This displays fine on the page but the bootstrap.css file is not loaded (not present in the HTML) and thus the alert does not present correctly.
Here is my AppAssets.php file:
<?php
namespace frontend\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle {
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
Any ideas why it is not loading?