Skip to content

Instantly share code, notes, and snippets.

@susilolab
Created September 26, 2019 03:02
Show Gist options
  • Select an option

  • Save susilolab/f96a4ab4184d45096a167edd493f0bc7 to your computer and use it in GitHub Desktop.

Select an option

Save susilolab/f96a4ab4184d45096a167edd493f0bc7 to your computer and use it in GitHub Desktop.
Trigger event setelah asset bundle didaftarkan
<?php
namespace app\components;
class AssetBundle extends \yii\web\AssetBundle
{
public function publish($am)
{
parent::publish($am);
if (isset($this->basePath, $this->baseUrl) && ($converter = $am->getConverter()) !== null) {
file_put_contents(filename, data)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment