title: How to access a js file outside the public folder?
body: <p>I was trying to register a vue component in the <code>app.js</code> file from a laravel project but I just can't seem to find the right path for the <code>app.js</code>, there are two files with <code>app.js</code> filenames. Here is my file structure:</p>
  
  <pre><code>public
          css
          js
                 app.js
  
  resources
          js
                components
                       Articles.vue
                       ExampleComponent.Vue
                app.js
                bootstrap.js
  </code></pre>
  
  <p>Here is where I imported my app.js file to my blade file:</p>
  
  <pre><code>&lt;body&gt;
      &lt;div id="app"&gt;
          &lt;articles&gt;
  
          &lt;/articles&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript" src="{{ assets('js/app.js') }}"&gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p>The problem is I want to access the second <code>app.js</code> file which is in the <code>resources</code> folder, but the above code keeps giving me the first <code>app.js</code> file which is in the <code>public</code> folder.</p>
  
  <p>I tried giving it the absolute path to the file using this code <code>URL::asset('resources/js/app.js')</code>
  <br>
  This gives me a url like <code>localhost:8000/resources/js/app.js</code> which is the correct file location but somehow this link leads to a <code>404</code> page. So is there any other way to access the file?</p>
  
  <p>Thanks</p>