There are times when you want to change the directory structure of Laravel before uploading it on the server, just as you have multiple sites on a server and you don't want to change the document root of your server to the Laravel's public directory as it will mean all other sites' roots will also change. Or when your shared server-hosting provider doesn't allow you to change the document root of your site. Then your best bet is to change the directory structure of your Laravel application before deploying it to meet the server's directory structure.
In order to do that, you would need to assume that your
www folder from the web host is the public directory of your Laravel installation. ...