When I do this…
$assets = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
$this -> _assetsUrl = Yii::$app->getAssetManager()->publish($assets);
… dot files (hidden) are not published. What should I do? This didn’t happen in Yii 1.
When I do this…
$assets = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
$this -> _assetsUrl = Yii::$app->getAssetManager()->publish($assets);
… dot files (hidden) are not published. What should I do? This didn’t happen in Yii 1.
I’ve found the solution!!! I’ll post it here in case someone needs it:
$assets = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
$this -> _assetsUrl = Yii::$app->getAssetManager()->publish($assets, array('beforeCopy' =>
function($from, $to)
{
if(strpos($from, '.directory') < 1)
return $from;
}
));