Laravel public folder

I was wondering if anyone could shed some light on why the index.php file for the laravel application lives in a public directory. What are the risks if I have to move it to the root directory?

+4
source share
1 answer

Files and folders in the laravels shared folder are for web access. For security, all other files and folders in the laravel structure should not be accessible on the Internet.

Moving index.php to the root of laravels will disrupt the structure and ignore best practices.

Follow these instructions to make sure your server configurations point to the DocumentRoot shared directory.

+5
source

Source: https://habr.com/ru/post/1436876/


All Articles