title: Laravel 5: How to avoid public folder, trying to open from root in localhost
body: <p>I'm following the following Structure as I don't want to expose my code to the public.</p>
  
  <p>The folder structure in my localhost is</p>
  
  <pre><code>tbt
      tbt/user/
      tbt/public_html/
  </code></pre>
  
  <p>where user contains all the folder of root without the public folder and public_html contains the public files.</p>
  
  <p>And I have changed in below lines in public_html/index.php:</p>
  
  <pre><code>require __DIR__.'/../user/bootstrap/autoload.php';
  $app = require_once __DIR__.'/../user/bootstrap/app.php';
  </code></pre>
  
  <p>But when i run the application,     </p>
  
  <p>I'm getting Url like <code>localhost/tbt/user/xxxx</code>   But it should be <code>localhost/tbt/xxx</code></p>
  
  <p>I have followed this <a href="https://stackoverflow.com/questions/37958149/laravel-5-2-avoiding-public-folder-and-open-directly-from-root-in-localhost/37958193#37958193">solution</a> for solving the problem but couldn't solve it as My application is on Laravel 5. Anyone who can help me to find the solution please?</p>