Only the assets that are publicly accessible are in that directory. This isolates the rest of the project from being accessible from the outside. Since laravel uses a front loader (the index.php in public) that is the only php script that has to be publicly accessible to enter into the application.
When configuring the webserver to use the public folder as the web root, you are saying that only these files are accessible to the outside world. The webserver will only look in the public folder for existing files. Which means the webserver will never serve any files that aren't in that directory.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community