title: Returning a Javascript file through Laravel
body: <p>I am looking to return a Javascript file when a customer goes to a specific URL on my Laravel development. I will run a check against a DB table before showing the Javascript file;</p>
  
  <ol>
  <li>User visits <a href="http://www.website.co.uk/account/123542/javascript.js" rel="nofollow">http://www.website.co.uk/account/123542/javascript.js</a></li>
  <li>Laravel checks against the DB to see if 123542 exists as an account</li>
  <li>If it exists then return javascript.js if not return error.</li>
  </ol>
  
  <p>The javascript file will be the same no matter what URL is requested so I just need to return a JS file.</p>
  
  <p>I just need to know how to return the Javascript file.</p>