Here in this Laravel Example, we are going to see a tested way to remove the public from URLs in Laravel.
Note: This example works on Laravel version 5 or above.
- In your root directory of the Laravel project, you find a file named,
server.phprename this file from server.php to index.php.
- Now copy .htaccess file from your public directory and Paste it to the root directory.