Adding collections outside of config file
Hi,
Thanks for a great package, the package has saved me hours of development already.
I was wondering if the following was possible, based on what I am trying to accomplish. I essentially want to control which javascript and css files are added to different views in my app via an an xml file, and therefore this will be done from within my BaseController class.
I can already add files from my Base controller, which is great, however they are not merged into the single file as they are when I add the changes manually to the config array (This is after deleting manifests and rebuilding using the artisan command).
Is there any way to do this ?
This is the function from my base controller which I'm using to test the above:
public function renderAssetsFromLayout() {
Basset::collection('global', function($collection)
{
$collection->javascript('assets/js/global/global.js');
$collection->javascript('assets/js/global/global-2.js');
//$collection->requireTree('assets/js/global');
})->apply('JsMin')->apply('UriRewriteFilter');;
}
Thanks in advance Musaffar Patel