Hi! Newbie here! Can't find answer in my head.
Let's say, I have following code in ControllerBase.php:
$finalJs = "assets/js/scripts.min.js";
$footerCollection = $this->assets->collection("libs");
$footerCollection
->addJs('assets/js/jquery-3.1.1.js')
->addJs(assets/js/bootstrap.js')
->setTargetPath($finalJs)
->setTargetUri($finalJs)
->join(true);
->addFilter(new \Phalcon\Assets\Filters\Jsmin());
And how add to this collection for minify from another controller, let's name it ExampleController.php:
public indexAction()
{
...
$this->assets->collection("libs")->addjs('assets/js/example.js');
}
Thanks for advice!