Laravel 5 – Remove public from URL

Last Updated: June 7, 2020

When you install Laravel in your server you will get URL like this to list your customers
I need somethig like this

This is the solution. You have to do two things to remove “public/index.php” from the URL

1 Rename server.php in your Laravel root folder to index.php
2 Copy the .htaccess file from /public directory to your Laravel root folder.