hi . i have a base controller that all the other controller extends from it. in the base i add some general assets to the colection. every other controller has theire own related assets that add to collection . in the base controller :
$this->assets ->collection('footer') ->addJs('js/bootstrap.min.js', true, false) ->addJs('js/jquery.slimscroll.min.js', true, false) ->addJs('js/jquery.slideandswipe.min.js', true, false) ->addJs('js/moment.min.js', true, false) ->addJs('js/moment-jalaali.js',true,false) ->addJs('js/friendlyDate.js');
and the other controller :
$this->assets->collection('footer') ->addJs('js/Chart.min.js') ->addJs('js/persian.js');
if i add the filter in the base controller , the 2 assets i add in the other controller wont add to the collection minified version.
i try to minify the collection using " afterExecuteRoute " so the collection minified version contain all the files . but it seems only the files in the base will merged into one file !
public function afterExecuteRoute(Event $event) { $this->assets->collection('footer') ->setTargetPath('js/merged.js') ->setTargetUri("js/merged.js") ->join(true) ->addFilter(new Jsmin()); }
am i missing something ?