Replies: 2 comments
-
What I propose is that this be a default configuration of laravel |
Beta Was this translation helpful? Give feedback.
0 replies
-
I dont understand what benefit is provided from being able to modify where the public folder is? Perhaps I'm missing something but i dont see how this is a security issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Studying the code of the framework I found that it is possible to customize the root folder of the laravel source code and I experimented and it worked, it's great.
The structure of the project that has become is:
rootDir
public
Editing the public folder works fine.
I have problems with the files that are in the public folder.
The php artisan serve commands; php artisan Storage:link, had problem.
When I searched through the code, the line
$this->instance('path.public', $this->publicPath());
shows that we can use a service provider orsetPublic
method, or use the configuration file to set the public path.I tested with this line
$this->app->instance('path.public',__DIR__ .'/../../../public');
in the service app service provider and it worked fine.Laravel is really awesome.
This can allow the public folder to not always be called public, or even it can be a deep folder But it could also be a real security measure brought to laravel
Beta Was this translation helpful? Give feedback.
All reactions