Answer the question
In order to leave comments, you need to log in
Who solves the problem with assets in yii?
Hello!
There is a constant problem with the fact that the data in the assets files (modules) changes, but does not change in the root assets. You have to manually drop the folder or drop the entire cache. Oh, it's not convenient.
Who solves such a problem?
Thanks everyone for the replies/advice.
Answer the question
In order to leave comments, you need to log in
'components' => [
'assetManager' => [
'linkAssets' => true,
]
]
Personally, I made a function into which the module alias is passed and
$path = Yii::getPathOfAlias($alias);
$assets = Yii::app()->getAssetManager()->publish($path. '/assets', false, -1);
rmdir($assets);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question