public function getAssetUrl($bundle, $asset) { $url = parent::getAssetUrl($bundle, $asset); $absPath = \Yii::getAlias('@webroot') . $url; if (is_file($absPath)) { $mtime = filemtime($absPath); $md = md5($mtime); $v = substr($md, 0, 8); $url .= StringHelper::contains($url, '?') ? '&' : '?'; $url .= "v={$v}"; } return $url; }