In laravel framework by default, all the route will get after the “public” in URL like http://localhost/my-project/public/myroute. There are some solution for avoiding the public from URL, Here I’ll show you a simple solution where you don’t have to setup extra configuration in live server. You don’t have to think about a virtual host or is the project in local or remote server. Let’s see the process.ess.
The steps are:
require __DIR__.'/../bootstrap/autoload.php'; $app = require_once __DIR__.'/../bootstrap/app.php';
require __DIR__.'/locale/bootstrap/autoload.php'; $app = require_once __DIR__.'/locale/bootstrap/app.php';
Finished! Now you can browse your project without entering the public word in the URL. You need not configure extra things in your live server. Just upload the full project files into your share hosting public_html directory and enjoy!