title: Laravel Asset Pipeline conditional JavaScript
body: <p>Since the <a href="https://github.com/CodeSleeve/asset-pipeline/" rel="nofollow">Asset Pipeline</a> package for Laravel doesn't allow you to conditionally add scripts/stylesheets to the page, what is the best way of doing this?</p>
  
  <p>I've got one JavaScript file which is a set of files concatenated together that are included on every page, providing us with a library file. What I now need to do is add another JavaScript file for certain pages (all of which use the same template).</p>
  
  <p>My current plan is to extend the <code>BaseController</code> to add an array of scripts/styles that can be dynamically attached to the template if there are any items. But surely there is a better way that is part of the Asset Pipeline packages?</p>