If you didn't know about PHP composer, you should get familiar with it.
So for example in my localhost the whole project is in one directory, but in production my application is inside
/var/www/appand my public folder is in/var/www/html. How would I handle this kind of deployment in this case?
I would SSH into the server, navigate to /var/www/, and create a folder that represents my project name, so /var/www/app.com, then I would configure my server root to point to /var/www/app.com/public (Laravel default).
Edited to add...
Your initial deploy would be:
- Develop Locally
- Commit/Push Changes to GitHub or the like
- SSH into your server, and navigate to your application root ex.
/var/www/app.comand pull in your changes - Run your composer install command to pull in vendors folder (something you shouldn't keep in your repo)
- Off you go
Now that was simplistic overview, there's more things to consider like migrations, but I don't know what you understand about all of this to give you more fitting answer. What have you tried so far?