On a production/staging setup of an application with every deployment all the contents of the public folder are lost. The contents on the storage folder are never lost with deployments. So when you link storage to the public folder you can access them from the web knowing they'll always be there between deployments.
Apr 11, 2020
4
Level 13
What's the main purpose of linking public/storage to storage/app/public?
I've always linked my public/storage folder to storage/app/public folder; but never questioned why. Is there any specific advantage of putting images inside storage/app/public folder and then accessing it via domain.com/storage/filename.ext ?
The only reason I could guess is that it makes it easier to deploy via GIT. But maybe there's more to it?
Please or to participate in this conversation.