- <?php
-
-
- namespace common\components;
-
- use yii\web\AssetBundle;
- use yii ;
-
-
- class MyAssetBundle extends AssetBundle
- {
- public $sourcePath = '@app/web/' ;
-
- public function addAsset($type, $path)
- {
- $this->$type[] = $path.'?v='.filemtime(Yii::getAlias($this->sourcePath.'/'.$path)) ;
- }
- }
|